mirror of
https://github.com/bitgapp/eqMac.git
synced 2024-11-22 22:32:17 +03:00
deleted pods
This commit is contained in:
parent
16c75b9a66
commit
0d78180746
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
Pods/
|
||||
.DS_Store
|
||||
.DS_Store/
|
||||
*/.DS_Store
|
||||
|
295
Pods/AFNetworking/AFNetworking/AFHTTPSessionManager.h
generated
295
Pods/AFNetworking/AFNetworking/AFHTTPSessionManager.h
generated
@ -1,295 +0,0 @@
|
||||
// AFHTTPSessionManager.h
|
||||
// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#if !TARGET_OS_WATCH
|
||||
#import <SystemConfiguration/SystemConfiguration.h>
|
||||
#endif
|
||||
#import <TargetConditionals.h>
|
||||
|
||||
#if TARGET_OS_IOS || TARGET_OS_WATCH || TARGET_OS_TV
|
||||
#import <MobileCoreServices/MobileCoreServices.h>
|
||||
#else
|
||||
#import <CoreServices/CoreServices.h>
|
||||
#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 `<AFURLRequestSerialization>`.
|
||||
|
||||
Responses received from the server are automatically validated and serialized by the `responseSerializers` property, which is an object conforming to `<AFURLResponseSerialization>`
|
||||
|
||||
## 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.
|
||||
*/
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface AFHTTPSessionManager : AFURLSessionManager <NSSecureCoding, NSCopying>
|
||||
|
||||
/**
|
||||
The URL used to construct requests from relative paths in methods like `requestWithMethod:URLString:parameters:`, and the `GET` / `POST` / et al. convenience methods.
|
||||
*/
|
||||
@property (readonly, nonatomic, strong, nullable) NSURL *baseURL;
|
||||
|
||||
/**
|
||||
Requests created with `requestWithMethod:URLString:parameters:` & `multipartFormRequestWithMethod:URLString:parameters:constructingBodyWithBlock:` are constructed with a set of default headers using a parameter serialization specified by this property. By default, this is set to an instance of `AFHTTPRequestSerializer`, which serializes query string parameters for `GET`, `HEAD`, and `DELETE` requests, or otherwise URL-form-encodes HTTP message bodies.
|
||||
|
||||
@warning `requestSerializer` must not be `nil`.
|
||||
*/
|
||||
@property (nonatomic, strong) AFHTTPRequestSerializer <AFURLRequestSerialization> * 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 <AFURLResponseSerialization> * responseSerializer;
|
||||
|
||||
///---------------------
|
||||
/// @name Initialization
|
||||
///---------------------
|
||||
|
||||
/**
|
||||
Creates and returns an `AFHTTPSessionManager` object.
|
||||
*/
|
||||
+ (instancetype)manager;
|
||||
|
||||
/**
|
||||
Initializes an `AFHTTPSessionManager` object with the specified base URL.
|
||||
|
||||
@param url The base URL for the HTTP client.
|
||||
|
||||
@return The newly-initialized HTTP client
|
||||
*/
|
||||
- (instancetype)initWithBaseURL:(nullable NSURL *)url;
|
||||
|
||||
/**
|
||||
Initializes an `AFHTTPSessionManager` object with the specified base URL.
|
||||
|
||||
This is the designated initializer.
|
||||
|
||||
@param url The base URL for the HTTP client.
|
||||
@param configuration The configuration used to create the managed session.
|
||||
|
||||
@return The newly-initialized HTTP client
|
||||
*/
|
||||
- (instancetype)initWithBaseURL:(nullable NSURL *)url
|
||||
sessionConfiguration:(nullable NSURLSessionConfiguration *)configuration NS_DESIGNATED_INITIALIZER;
|
||||
|
||||
///---------------------------
|
||||
/// @name Making HTTP Requests
|
||||
///---------------------------
|
||||
|
||||
/**
|
||||
Creates and runs an `NSURLSessionDataTask` with a `GET` request.
|
||||
|
||||
@param URLString The URL string used to create the request URL.
|
||||
@param parameters The parameters to be encoded according to the client request serializer.
|
||||
@param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer.
|
||||
@param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred.
|
||||
|
||||
@see -dataTaskWithRequest:completionHandler:
|
||||
*/
|
||||
- (nullable NSURLSessionDataTask *)GET:(NSString *)URLString
|
||||
parameters:(nullable id)parameters
|
||||
success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success
|
||||
failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure DEPRECATED_ATTRIBUTE;
|
||||
|
||||
|
||||
/**
|
||||
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 downloadProgress A block object to be executed when the download progress is updated. Note this block is called on the session queue, not the main queue.
|
||||
@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:uploadProgress:downloadProgress:completionHandler:
|
||||
*/
|
||||
- (nullable NSURLSessionDataTask *)GET:(NSString *)URLString
|
||||
parameters:(nullable id)parameters
|
||||
progress:(nullable void (^)(NSProgress *downloadProgress))downloadProgress
|
||||
success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success
|
||||
failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure;
|
||||
|
||||
/**
|
||||
Creates and runs an `NSURLSessionDataTask` with a `HEAD` request.
|
||||
|
||||
@param URLString The URL string used to create the request URL.
|
||||
@param parameters The parameters to be encoded according to the client request serializer.
|
||||
@param success A block object to be executed when the task finishes successfully. This block has no return value and takes a single arguments: the data task.
|
||||
@param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred.
|
||||
|
||||
@see -dataTaskWithRequest:completionHandler:
|
||||
*/
|
||||
- (nullable NSURLSessionDataTask *)HEAD:(NSString *)URLString
|
||||
parameters:(nullable id)parameters
|
||||
success:(nullable void (^)(NSURLSessionDataTask *task))success
|
||||
failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure;
|
||||
|
||||
/**
|
||||
Creates and runs an `NSURLSessionDataTask` with a `POST` request.
|
||||
|
||||
@param URLString The URL string used to create the request URL.
|
||||
@param parameters The parameters to be encoded according to the client request serializer.
|
||||
@param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer.
|
||||
@param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred.
|
||||
|
||||
@see -dataTaskWithRequest:completionHandler:
|
||||
*/
|
||||
- (nullable NSURLSessionDataTask *)POST:(NSString *)URLString
|
||||
parameters:(nullable id)parameters
|
||||
success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success
|
||||
failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure DEPRECATED_ATTRIBUTE;
|
||||
|
||||
/**
|
||||
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 uploadProgress A block object to be executed when the upload progress is updated. Note this block is called on the session queue, not the main queue.
|
||||
@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:uploadProgress:downloadProgress:completionHandler:
|
||||
*/
|
||||
- (nullable NSURLSessionDataTask *)POST:(NSString *)URLString
|
||||
parameters:(nullable id)parameters
|
||||
progress:(nullable void (^)(NSProgress *uploadProgress))uploadProgress
|
||||
success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success
|
||||
failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure;
|
||||
|
||||
/**
|
||||
Creates and runs an `NSURLSessionDataTask` with a multipart `POST` request.
|
||||
|
||||
@param URLString The URL string used to create the request URL.
|
||||
@param parameters The parameters to be encoded according to the client request serializer.
|
||||
@param block A block that takes a single argument and appends data to the HTTP body. The block argument is an object adopting the `AFMultipartFormData` protocol.
|
||||
@param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer.
|
||||
@param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred.
|
||||
|
||||
@see -dataTaskWithRequest:completionHandler:
|
||||
*/
|
||||
- (nullable NSURLSessionDataTask *)POST:(NSString *)URLString
|
||||
parameters:(nullable id)parameters
|
||||
constructingBodyWithBlock:(nullable void (^)(id <AFMultipartFormData> formData))block
|
||||
success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success
|
||||
failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure DEPRECATED_ATTRIBUTE;
|
||||
|
||||
/**
|
||||
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 uploadProgress A block object to be executed when the upload progress is updated. Note this block is called on the session queue, not the main queue.
|
||||
@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:uploadProgress:downloadProgress:completionHandler:
|
||||
*/
|
||||
- (nullable NSURLSessionDataTask *)POST:(NSString *)URLString
|
||||
parameters:(nullable id)parameters
|
||||
constructingBodyWithBlock:(nullable void (^)(id <AFMultipartFormData> formData))block
|
||||
progress:(nullable void (^)(NSProgress *uploadProgress))uploadProgress
|
||||
success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success
|
||||
failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure;
|
||||
|
||||
/**
|
||||
Creates and runs an `NSURLSessionDataTask` with a `PUT` request.
|
||||
|
||||
@param URLString The URL string used to create the request URL.
|
||||
@param parameters The parameters to be encoded according to the client request serializer.
|
||||
@param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer.
|
||||
@param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred.
|
||||
|
||||
@see -dataTaskWithRequest:completionHandler:
|
||||
*/
|
||||
- (nullable NSURLSessionDataTask *)PUT:(NSString *)URLString
|
||||
parameters:(nullable id)parameters
|
||||
success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success
|
||||
failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure;
|
||||
|
||||
/**
|
||||
Creates and runs an `NSURLSessionDataTask` with a `PATCH` request.
|
||||
|
||||
@param URLString The URL string used to create the request URL.
|
||||
@param parameters The parameters to be encoded according to the client request serializer.
|
||||
@param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer.
|
||||
@param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred.
|
||||
|
||||
@see -dataTaskWithRequest:completionHandler:
|
||||
*/
|
||||
- (nullable NSURLSessionDataTask *)PATCH:(NSString *)URLString
|
||||
parameters:(nullable id)parameters
|
||||
success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success
|
||||
failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure;
|
||||
|
||||
/**
|
||||
Creates and runs an `NSURLSessionDataTask` with a `DELETE` request.
|
||||
|
||||
@param URLString The URL string used to create the request URL.
|
||||
@param parameters The parameters to be encoded according to the client request serializer.
|
||||
@param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer.
|
||||
@param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred.
|
||||
|
||||
@see -dataTaskWithRequest:completionHandler:
|
||||
*/
|
||||
- (nullable NSURLSessionDataTask *)DELETE:(NSString *)URLString
|
||||
parameters:(nullable id)parameters
|
||||
success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success
|
||||
failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
361
Pods/AFNetworking/AFNetworking/AFHTTPSessionManager.m
generated
361
Pods/AFNetworking/AFNetworking/AFHTTPSessionManager.m
generated
@ -1,361 +0,0 @@
|
||||
// AFHTTPSessionManager.m
|
||||
// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
#import "AFHTTPSessionManager.h"
|
||||
|
||||
#import "AFURLRequestSerialization.h"
|
||||
#import "AFURLResponseSerialization.h"
|
||||
|
||||
#import <Availability.h>
|
||||
#import <TargetConditionals.h>
|
||||
#import <Security/Security.h>
|
||||
|
||||
#import <netinet/in.h>
|
||||
#import <netinet6/in6.h>
|
||||
#import <arpa/inet.h>
|
||||
#import <ifaddrs.h>
|
||||
#import <netdb.h>
|
||||
|
||||
#if TARGET_OS_IOS || TARGET_OS_TV
|
||||
#import <UIKit/UIKit.h>
|
||||
#elif TARGET_OS_WATCH
|
||||
#import <WatchKit/WatchKit.h>
|
||||
#endif
|
||||
|
||||
@interface AFHTTPSessionManager ()
|
||||
@property (readwrite, nonatomic, strong) NSURL *baseURL;
|
||||
@end
|
||||
|
||||
@implementation AFHTTPSessionManager
|
||||
@dynamic responseSerializer;
|
||||
|
||||
+ (instancetype)manager {
|
||||
return [[[self class] alloc] initWithBaseURL:nil];
|
||||
}
|
||||
|
||||
- (instancetype)init {
|
||||
return [self initWithBaseURL:nil];
|
||||
}
|
||||
|
||||
- (instancetype)initWithBaseURL:(NSURL *)url {
|
||||
return [self initWithBaseURL:url sessionConfiguration:nil];
|
||||
}
|
||||
|
||||
- (instancetype)initWithSessionConfiguration:(NSURLSessionConfiguration *)configuration {
|
||||
return [self initWithBaseURL:nil sessionConfiguration:configuration];
|
||||
}
|
||||
|
||||
- (instancetype)initWithBaseURL:(NSURL *)url
|
||||
sessionConfiguration:(NSURLSessionConfiguration *)configuration
|
||||
{
|
||||
self = [super initWithSessionConfiguration:configuration];
|
||||
if (!self) {
|
||||
return nil;
|
||||
}
|
||||
|
||||
// Ensure terminal slash for baseURL path, so that NSURL +URLWithString:relativeToURL: works as expected
|
||||
if ([[url path] length] > 0 && ![[url absoluteString] hasSuffix:@"/"]) {
|
||||
url = [url URLByAppendingPathComponent:@""];
|
||||
}
|
||||
|
||||
self.baseURL = url;
|
||||
|
||||
self.requestSerializer = [AFHTTPRequestSerializer serializer];
|
||||
self.responseSerializer = [AFJSONResponseSerializer serializer];
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
|
||||
- (void)setRequestSerializer:(AFHTTPRequestSerializer <AFURLRequestSerialization> *)requestSerializer {
|
||||
NSParameterAssert(requestSerializer);
|
||||
|
||||
_requestSerializer = requestSerializer;
|
||||
}
|
||||
|
||||
- (void)setResponseSerializer:(AFHTTPResponseSerializer <AFURLResponseSerialization> *)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
|
||||
{
|
||||
|
||||
return [self GET:URLString parameters:parameters progress:nil success:success failure:failure];
|
||||
}
|
||||
|
||||
- (NSURLSessionDataTask *)GET:(NSString *)URLString
|
||||
parameters:(id)parameters
|
||||
progress:(void (^)(NSProgress * _Nonnull))downloadProgress
|
||||
success:(void (^)(NSURLSessionDataTask * _Nonnull, id _Nullable))success
|
||||
failure:(void (^)(NSURLSessionDataTask * _Nullable, NSError * _Nonnull))failure
|
||||
{
|
||||
|
||||
NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@"GET"
|
||||
URLString:URLString
|
||||
parameters:parameters
|
||||
uploadProgress:nil
|
||||
downloadProgress:downloadProgress
|
||||
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 uploadProgress:nil downloadProgress:nil 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
|
||||
{
|
||||
return [self POST:URLString parameters:parameters progress:nil success:success failure:failure];
|
||||
}
|
||||
|
||||
- (NSURLSessionDataTask *)POST:(NSString *)URLString
|
||||
parameters:(id)parameters
|
||||
progress:(void (^)(NSProgress * _Nonnull))uploadProgress
|
||||
success:(void (^)(NSURLSessionDataTask * _Nonnull, id _Nullable))success
|
||||
failure:(void (^)(NSURLSessionDataTask * _Nullable, NSError * _Nonnull))failure
|
||||
{
|
||||
NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@"POST" URLString:URLString parameters:parameters uploadProgress:uploadProgress downloadProgress:nil success:success failure:failure];
|
||||
|
||||
[dataTask resume];
|
||||
|
||||
return dataTask;
|
||||
}
|
||||
|
||||
- (NSURLSessionDataTask *)POST:(NSString *)URLString
|
||||
parameters:(nullable id)parameters
|
||||
constructingBodyWithBlock:(nullable void (^)(id<AFMultipartFormData> _Nonnull))block
|
||||
success:(nullable void (^)(NSURLSessionDataTask * _Nonnull, id _Nullable))success
|
||||
failure:(nullable void (^)(NSURLSessionDataTask * _Nullable, NSError * _Nonnull))failure
|
||||
{
|
||||
return [self POST:URLString parameters:parameters constructingBodyWithBlock:block progress:nil success:success failure:failure];
|
||||
}
|
||||
|
||||
- (NSURLSessionDataTask *)POST:(NSString *)URLString
|
||||
parameters:(id)parameters
|
||||
constructingBodyWithBlock:(void (^)(id <AFMultipartFormData> formData))block
|
||||
progress:(nullable void (^)(NSProgress * _Nonnull))uploadProgress
|
||||
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:uploadProgress 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 uploadProgress:nil downloadProgress:nil 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 uploadProgress:nil downloadProgress:nil 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 uploadProgress:nil downloadProgress:nil success:success failure:failure];
|
||||
|
||||
[dataTask resume];
|
||||
|
||||
return dataTask;
|
||||
}
|
||||
|
||||
- (NSURLSessionDataTask *)dataTaskWithHTTPMethod:(NSString *)method
|
||||
URLString:(NSString *)URLString
|
||||
parameters:(id)parameters
|
||||
uploadProgress:(nullable void (^)(NSProgress *uploadProgress)) uploadProgress
|
||||
downloadProgress:(nullable void (^)(NSProgress *downloadProgress)) downloadProgress
|
||||
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
|
||||
uploadProgress:uploadProgress
|
||||
downloadProgress:downloadProgress
|
||||
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;
|
||||
}
|
||||
|
||||
- (instancetype)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))];
|
||||
AFSecurityPolicy *decodedPolicy = [decoder decodeObjectOfClass:[AFSecurityPolicy class] forKey:NSStringFromSelector(@selector(securityPolicy))];
|
||||
if (decodedPolicy) {
|
||||
self.securityPolicy = decodedPolicy;
|
||||
}
|
||||
|
||||
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))];
|
||||
[coder encodeObject:self.securityPolicy forKey:NSStringFromSelector(@selector(securityPolicy))];
|
||||
}
|
||||
|
||||
#pragma mark - NSCopying
|
||||
|
||||
- (instancetype)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];
|
||||
HTTPClient.securityPolicy = [self.securityPolicy copyWithZone:zone];
|
||||
return HTTPClient;
|
||||
}
|
||||
|
||||
@end
|
@ -1,206 +0,0 @@
|
||||
// AFNetworkReachabilityManager.h
|
||||
// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#if !TARGET_OS_WATCH
|
||||
#import <SystemConfiguration/SystemConfiguration.h>
|
||||
|
||||
typedef NS_ENUM(NSInteger, AFNetworkReachabilityStatus) {
|
||||
AFNetworkReachabilityStatusUnknown = -1,
|
||||
AFNetworkReachabilityStatusNotReachable = 0,
|
||||
AFNetworkReachabilityStatusReachableViaWWAN = 1,
|
||||
AFNetworkReachabilityStatusReachableViaWiFi = 2,
|
||||
};
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
`AFNetworkReachabilityManager` monitors the reachability of domains, and addresses for both WWAN and WiFi network interfaces.
|
||||
|
||||
Reachability can be used to determine background information about why a network operation failed, or to trigger a network operation retrying when a connection is established. It should not be used to prevent a user from initiating a network request, as it's possible that an initial request may be required to establish reachability.
|
||||
|
||||
See Apple's Reachability Sample Code ( https://developer.apple.com/library/ios/samplecode/reachability/ )
|
||||
|
||||
@warning Instances of `AFNetworkReachabilityManager` must be started with `-startMonitoring` before reachability status can be determined.
|
||||
*/
|
||||
@interface AFNetworkReachabilityManager : NSObject
|
||||
|
||||
/**
|
||||
The current network reachability status.
|
||||
*/
|
||||
@property (readonly, nonatomic, assign) AFNetworkReachabilityStatus networkReachabilityStatus;
|
||||
|
||||
/**
|
||||
Whether or not the network is currently reachable.
|
||||
*/
|
||||
@property (readonly, nonatomic, assign, getter = isReachable) BOOL reachable;
|
||||
|
||||
/**
|
||||
Whether or not the network is currently reachable via WWAN.
|
||||
*/
|
||||
@property (readonly, nonatomic, assign, getter = isReachableViaWWAN) BOOL reachableViaWWAN;
|
||||
|
||||
/**
|
||||
Whether or not the network is currently reachable via WiFi.
|
||||
*/
|
||||
@property (readonly, nonatomic, assign, getter = isReachableViaWiFi) BOOL reachableViaWiFi;
|
||||
|
||||
///---------------------
|
||||
/// @name Initialization
|
||||
///---------------------
|
||||
|
||||
/**
|
||||
Returns the shared network reachability manager.
|
||||
*/
|
||||
+ (instancetype)sharedManager;
|
||||
|
||||
/**
|
||||
Creates and returns a network reachability manager with the default socket address.
|
||||
|
||||
@return An initialized network reachability manager, actively monitoring the default socket address.
|
||||
*/
|
||||
+ (instancetype)manager;
|
||||
|
||||
/**
|
||||
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_in6`) used to evaluate network reachability.
|
||||
|
||||
@return An initialized network reachability manager, actively monitoring the specified socket address.
|
||||
*/
|
||||
+ (instancetype)managerForAddress:(const void *)address;
|
||||
|
||||
/**
|
||||
Initializes an instance of a network reachability manager from the specified reachability object.
|
||||
|
||||
@param reachability The reachability object to monitor.
|
||||
|
||||
@return An initialized network reachability manager, actively monitoring the specified reachability.
|
||||
*/
|
||||
- (instancetype)initWithReachability:(SCNetworkReachabilityRef)reachability NS_DESIGNATED_INITIALIZER;
|
||||
|
||||
///--------------------------------------------------
|
||||
/// @name Starting & Stopping Reachability Monitoring
|
||||
///--------------------------------------------------
|
||||
|
||||
/**
|
||||
Starts monitoring for changes in network reachability status.
|
||||
*/
|
||||
- (void)startMonitoring;
|
||||
|
||||
/**
|
||||
Stops monitoring for changes in network reachability status.
|
||||
*/
|
||||
- (void)stopMonitoring;
|
||||
|
||||
///-------------------------------------------------
|
||||
/// @name Getting Localized Reachability Description
|
||||
///-------------------------------------------------
|
||||
|
||||
/**
|
||||
Returns a localized string representation of the current network reachability status.
|
||||
*/
|
||||
- (NSString *)localizedNetworkReachabilityStatusString;
|
||||
|
||||
///---------------------------------------------------
|
||||
/// @name Setting Network Reachability Change Callback
|
||||
///---------------------------------------------------
|
||||
|
||||
/**
|
||||
Sets a callback to be executed when the network availability of the `baseURL` host changes.
|
||||
|
||||
@param block A block object to be executed when the network availability of the `baseURL` host changes.. This block has no return value and takes a single argument which represents the various reachability states from the device to the `baseURL`.
|
||||
*/
|
||||
- (void)setReachabilityStatusChangeBlock:(nullable void (^)(AFNetworkReachabilityStatus status))block;
|
||||
|
||||
@end
|
||||
|
||||
///----------------
|
||||
/// @name Constants
|
||||
///----------------
|
||||
|
||||
/**
|
||||
## Network Reachability
|
||||
|
||||
The following constants are provided by `AFNetworkReachabilityManager` as possible network reachability statuses.
|
||||
|
||||
enum {
|
||||
AFNetworkReachabilityStatusUnknown,
|
||||
AFNetworkReachabilityStatusNotReachable,
|
||||
AFNetworkReachabilityStatusReachableViaWWAN,
|
||||
AFNetworkReachabilityStatusReachableViaWiFi,
|
||||
}
|
||||
|
||||
`AFNetworkReachabilityStatusUnknown`
|
||||
The `baseURL` host reachability is not known.
|
||||
|
||||
`AFNetworkReachabilityStatusNotReachable`
|
||||
The `baseURL` host cannot be reached.
|
||||
|
||||
`AFNetworkReachabilityStatusReachableViaWWAN`
|
||||
The `baseURL` host can be reached via a cellular connection, such as EDGE or GPRS.
|
||||
|
||||
`AFNetworkReachabilityStatusReachableViaWiFi`
|
||||
The `baseURL` host can be reached via a Wi-Fi connection.
|
||||
|
||||
### Keys for Notification UserInfo Dictionary
|
||||
|
||||
Strings that are used as keys in a `userInfo` dictionary in a network reachability status change notification.
|
||||
|
||||
`AFNetworkingReachabilityNotificationStatusItem`
|
||||
A key in the userInfo dictionary in a `AFNetworkingReachabilityDidChangeNotification` notification.
|
||||
The corresponding value is an `NSNumber` object representing the `AFNetworkReachabilityStatus` value for the current reachability status.
|
||||
*/
|
||||
|
||||
///--------------------
|
||||
/// @name Notifications
|
||||
///--------------------
|
||||
|
||||
/**
|
||||
Posted when network reachability changes.
|
||||
This notification assigns no notification object. The `userInfo` dictionary contains an `NSNumber` object under the `AFNetworkingReachabilityNotificationStatusItem` key, representing the `AFNetworkReachabilityStatus` value for the current network reachability.
|
||||
|
||||
@warning In order for network reachability to be monitored, include the `SystemConfiguration` framework in the active target's "Link Binary With Library" build phase, and add `#import <SystemConfiguration/SystemConfiguration.h>` to the header prefix of the project (`Prefix.pch`).
|
||||
*/
|
||||
FOUNDATION_EXPORT NSString * const AFNetworkingReachabilityDidChangeNotification;
|
||||
FOUNDATION_EXPORT NSString * const AFNetworkingReachabilityNotificationStatusItem;
|
||||
|
||||
///--------------------
|
||||
/// @name Functions
|
||||
///--------------------
|
||||
|
||||
/**
|
||||
Returns a localized string representation of an `AFNetworkReachabilityStatus` value.
|
||||
*/
|
||||
FOUNDATION_EXPORT NSString * AFStringFromNetworkReachabilityStatus(AFNetworkReachabilityStatus status);
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
#endif
|
@ -1,263 +0,0 @@
|
||||
// AFNetworkReachabilityManager.m
|
||||
// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
#import "AFNetworkReachabilityManager.h"
|
||||
#if !TARGET_OS_WATCH
|
||||
|
||||
#import <netinet/in.h>
|
||||
#import <netinet6/in6.h>
|
||||
#import <arpa/inet.h>
|
||||
#import <ifaddrs.h>
|
||||
#import <netdb.h>
|
||||
|
||||
NSString * const AFNetworkingReachabilityDidChangeNotification = @"com.alamofire.networking.reachability.change";
|
||||
NSString * const AFNetworkingReachabilityNotificationStatusItem = @"AFNetworkingReachabilityNotificationStatusItem";
|
||||
|
||||
typedef void (^AFNetworkReachabilityStatusBlock)(AFNetworkReachabilityStatus status);
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Queue a status change notification for the main thread.
|
||||
*
|
||||
* This is done to ensure that the notifications are received in the same order
|
||||
* as they are sent. If notifications are sent directly, it is possible that
|
||||
* a queued notification (for an earlier status condition) is processed after
|
||||
* the later update, resulting in the listener being left in the wrong state.
|
||||
*/
|
||||
static void AFPostReachabilityStatusChange(SCNetworkReachabilityFlags flags, AFNetworkReachabilityStatusBlock block) {
|
||||
AFNetworkReachabilityStatus status = AFNetworkReachabilityStatusForFlags(flags);
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
if (block) {
|
||||
block(status);
|
||||
}
|
||||
NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter];
|
||||
NSDictionary *userInfo = @{ AFNetworkingReachabilityNotificationStatusItem: @(status) };
|
||||
[notificationCenter postNotificationName:AFNetworkingReachabilityDidChangeNotification object:nil userInfo:userInfo];
|
||||
});
|
||||
}
|
||||
|
||||
static void AFNetworkReachabilityCallback(SCNetworkReachabilityRef __unused target, SCNetworkReachabilityFlags flags, void *info) {
|
||||
AFPostReachabilityStatusChange(flags, (__bridge AFNetworkReachabilityStatusBlock)info);
|
||||
}
|
||||
|
||||
|
||||
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 (readonly, nonatomic, assign) SCNetworkReachabilityRef networkReachability;
|
||||
@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, ^{
|
||||
_sharedManager = [self manager];
|
||||
});
|
||||
|
||||
return _sharedManager;
|
||||
}
|
||||
|
||||
+ (instancetype)managerForDomain:(NSString *)domain {
|
||||
SCNetworkReachabilityRef reachability = SCNetworkReachabilityCreateWithName(kCFAllocatorDefault, [domain UTF8String]);
|
||||
|
||||
AFNetworkReachabilityManager *manager = [[self alloc] initWithReachability:reachability];
|
||||
|
||||
CFRelease(reachability);
|
||||
|
||||
return manager;
|
||||
}
|
||||
|
||||
+ (instancetype)managerForAddress:(const void *)address {
|
||||
SCNetworkReachabilityRef reachability = SCNetworkReachabilityCreateWithAddress(kCFAllocatorDefault, (const struct sockaddr *)address);
|
||||
AFNetworkReachabilityManager *manager = [[self alloc] initWithReachability:reachability];
|
||||
|
||||
CFRelease(reachability);
|
||||
|
||||
return manager;
|
||||
}
|
||||
|
||||
+ (instancetype)manager
|
||||
{
|
||||
#if (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 90000) || (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101100)
|
||||
struct sockaddr_in6 address;
|
||||
bzero(&address, sizeof(address));
|
||||
address.sin6_len = sizeof(address);
|
||||
address.sin6_family = AF_INET6;
|
||||
#else
|
||||
struct sockaddr_in address;
|
||||
bzero(&address, sizeof(address));
|
||||
address.sin_len = sizeof(address);
|
||||
address.sin_family = AF_INET;
|
||||
#endif
|
||||
return [self managerForAddress:&address];
|
||||
}
|
||||
|
||||
- (instancetype)initWithReachability:(SCNetworkReachabilityRef)reachability {
|
||||
self = [super init];
|
||||
if (!self) {
|
||||
return nil;
|
||||
}
|
||||
|
||||
_networkReachability = CFRetain(reachability);
|
||||
self.networkReachabilityStatus = AFNetworkReachabilityStatusUnknown;
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (instancetype)init NS_UNAVAILABLE
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[self stopMonitoring];
|
||||
|
||||
if (_networkReachability != NULL) {
|
||||
CFRelease(_networkReachability);
|
||||
}
|
||||
}
|
||||
|
||||
#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);
|
||||
|
||||
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0),^{
|
||||
SCNetworkReachabilityFlags flags;
|
||||
if (SCNetworkReachabilityGetFlags(self.networkReachability, &flags)) {
|
||||
AFPostReachabilityStatusChange(flags, callback);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
- (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
|
||||
#endif
|
41
Pods/AFNetworking/AFNetworking/AFNetworking.h
generated
41
Pods/AFNetworking/AFNetworking/AFNetworking.h
generated
@ -1,41 +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 <Foundation/Foundation.h>
|
||||
#import <Availability.h>
|
||||
#import <TargetConditionals.h>
|
||||
|
||||
#ifndef _AFNETWORKING_
|
||||
#define _AFNETWORKING_
|
||||
|
||||
#import "AFURLRequestSerialization.h"
|
||||
#import "AFURLResponseSerialization.h"
|
||||
#import "AFSecurityPolicy.h"
|
||||
|
||||
#if !TARGET_OS_WATCH
|
||||
#import "AFNetworkReachabilityManager.h"
|
||||
#endif
|
||||
|
||||
#import "AFURLSessionManager.h"
|
||||
#import "AFHTTPSessionManager.h"
|
||||
|
||||
#endif /* _AFNETWORKING_ */
|
154
Pods/AFNetworking/AFNetworking/AFSecurityPolicy.h
generated
154
Pods/AFNetworking/AFNetworking/AFSecurityPolicy.h
generated
@ -1,154 +0,0 @@
|
||||
// AFSecurityPolicy.h
|
||||
// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <Security/Security.h>
|
||||
|
||||
typedef NS_ENUM(NSUInteger, AFSSLPinningMode) {
|
||||
AFSSLPinningModeNone,
|
||||
AFSSLPinningModePublicKey,
|
||||
AFSSLPinningModeCertificate,
|
||||
};
|
||||
|
||||
/**
|
||||
`AFSecurityPolicy` evaluates server trust against pinned X.509 certificates and public keys over secure connections.
|
||||
|
||||
Adding pinned SSL certificates to your app helps prevent man-in-the-middle attacks and other vulnerabilities. Applications dealing with sensitive customer data or financial information are strongly encouraged to route all communication over an HTTPS connection with SSL pinning configured and enabled.
|
||||
*/
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface AFSecurityPolicy : NSObject <NSSecureCoding, NSCopying>
|
||||
|
||||
/**
|
||||
The criteria by which server trust should be evaluated against the pinned SSL certificates. Defaults to `AFSSLPinningModeNone`.
|
||||
*/
|
||||
@property (readonly, nonatomic, assign) AFSSLPinningMode SSLPinningMode;
|
||||
|
||||
/**
|
||||
The certificates used to evaluate server trust according to the SSL pinning mode.
|
||||
|
||||
By default, this property is set to any (`.cer`) certificates included in the target compiling AFNetworking. Note that if you are using AFNetworking as embedded framework, no certificates will be pinned by default. Use `certificatesInBundle` to load certificates from your target, and then create a new policy by calling `policyWithPinningMode:withPinnedCertificates`.
|
||||
|
||||
Note that if pinning is enabled, `evaluateServerTrust:forDomain:` will return true if any pinned certificate matches.
|
||||
*/
|
||||
@property (nonatomic, strong, nullable) NSSet <NSData *> *pinnedCertificates;
|
||||
|
||||
/**
|
||||
Whether or not to trust servers with an invalid or expired SSL certificates. Defaults to `NO`.
|
||||
*/
|
||||
@property (nonatomic, assign) BOOL allowInvalidCertificates;
|
||||
|
||||
/**
|
||||
Whether or not to validate the domain name in the certificate's CN field. Defaults to `YES`.
|
||||
*/
|
||||
@property (nonatomic, assign) BOOL validatesDomainName;
|
||||
|
||||
///-----------------------------------------
|
||||
/// @name Getting Certificates from the Bundle
|
||||
///-----------------------------------------
|
||||
|
||||
/**
|
||||
Returns any certificates included in the bundle. If you are using AFNetworking as an embedded framework, you must use this method to find the certificates you have included in your app bundle, and use them when creating your security policy by calling `policyWithPinningMode:withPinnedCertificates`.
|
||||
|
||||
@return The certificates included in the given bundle.
|
||||
*/
|
||||
+ (NSSet <NSData *> *)certificatesInBundle:(NSBundle *)bundle;
|
||||
|
||||
///-----------------------------------------
|
||||
/// @name Getting Specific Security Policies
|
||||
///-----------------------------------------
|
||||
|
||||
/**
|
||||
Returns the shared default security policy, which does not allow invalid certificates, validates domain name, and does not validate against pinned certificates or public keys.
|
||||
|
||||
@return The default security policy.
|
||||
*/
|
||||
+ (instancetype)defaultPolicy;
|
||||
|
||||
///---------------------
|
||||
/// @name Initialization
|
||||
///---------------------
|
||||
|
||||
/**
|
||||
Creates and returns a security policy with the specified pinning mode.
|
||||
|
||||
@param pinningMode The SSL pinning mode.
|
||||
|
||||
@return A new security policy.
|
||||
*/
|
||||
+ (instancetype)policyWithPinningMode:(AFSSLPinningMode)pinningMode;
|
||||
|
||||
/**
|
||||
Creates and returns a security policy with the specified pinning mode.
|
||||
|
||||
@param pinningMode The SSL pinning mode.
|
||||
@param pinnedCertificates The certificates to pin against.
|
||||
|
||||
@return A new security policy.
|
||||
*/
|
||||
+ (instancetype)policyWithPinningMode:(AFSSLPinningMode)pinningMode withPinnedCertificates:(NSSet <NSData *> *)pinnedCertificates;
|
||||
|
||||
///------------------------------
|
||||
/// @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.
|
||||
@param domain The domain of serverTrust. If `nil`, the domain will not be validated.
|
||||
|
||||
@return Whether or not to trust the server.
|
||||
*/
|
||||
- (BOOL)evaluateServerTrust:(SecTrustRef)serverTrust
|
||||
forDomain:(nullable NSString *)domain;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
///----------------
|
||||
/// @name Constants
|
||||
///----------------
|
||||
|
||||
/**
|
||||
## SSL Pinning Modes
|
||||
|
||||
The following constants are provided by `AFSSLPinningMode` as possible SSL pinning modes.
|
||||
|
||||
enum {
|
||||
AFSSLPinningModeNone,
|
||||
AFSSLPinningModePublicKey,
|
||||
AFSSLPinningModeCertificate,
|
||||
}
|
||||
|
||||
`AFSSLPinningModeNone`
|
||||
Do not used pinned certificates to validate servers.
|
||||
|
||||
`AFSSLPinningModePublicKey`
|
||||
Validate host certificates against public keys of pinned certificates.
|
||||
|
||||
`AFSSLPinningModeCertificate`
|
||||
Validate host certificates against pinned certificates.
|
||||
*/
|
353
Pods/AFNetworking/AFNetworking/AFSecurityPolicy.m
generated
353
Pods/AFNetworking/AFNetworking/AFSecurityPolicy.m
generated
@ -1,353 +0,0 @@
|
||||
// AFSecurityPolicy.m
|
||||
// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
#import "AFSecurityPolicy.h"
|
||||
|
||||
#import <AssertMacros.h>
|
||||
|
||||
#if !TARGET_OS_IOS && !TARGET_OS_WATCH && !TARGET_OS_TV
|
||||
static NSData * AFSecKeyGetData(SecKeyRef key) {
|
||||
CFDataRef data = NULL;
|
||||
|
||||
__Require_noErr_Quiet(SecItemExport(key, kSecFormatUnknown, kSecItemPemArmour, NULL, &data), _out);
|
||||
|
||||
return (__bridge_transfer NSData *)data;
|
||||
|
||||
_out:
|
||||
if (data) {
|
||||
CFRelease(data);
|
||||
}
|
||||
|
||||
return nil;
|
||||
}
|
||||
#endif
|
||||
|
||||
static BOOL AFSecKeyIsEqualToKey(SecKeyRef key1, SecKeyRef key2) {
|
||||
#if TARGET_OS_IOS || TARGET_OS_WATCH || TARGET_OS_TV
|
||||
return [(__bridge id)key1 isEqual:(__bridge id)key2];
|
||||
#else
|
||||
return [AFSecKeyGetData(key1) isEqual:AFSecKeyGetData(key2)];
|
||||
#endif
|
||||
}
|
||||
|
||||
static id AFPublicKeyForCertificate(NSData *certificate) {
|
||||
id allowedPublicKey = nil;
|
||||
SecCertificateRef allowedCertificate;
|
||||
SecCertificateRef allowedCertificates[1];
|
||||
CFArrayRef tempCertificates = nil;
|
||||
SecPolicyRef policy = nil;
|
||||
SecTrustRef allowedTrust = nil;
|
||||
SecTrustResultType result;
|
||||
|
||||
allowedCertificate = SecCertificateCreateWithData(NULL, (__bridge CFDataRef)certificate);
|
||||
__Require_Quiet(allowedCertificate != NULL, _out);
|
||||
|
||||
allowedCertificates[0] = allowedCertificate;
|
||||
tempCertificates = CFArrayCreate(NULL, (const void **)allowedCertificates, 1, NULL);
|
||||
|
||||
policy = SecPolicyCreateBasicX509();
|
||||
__Require_noErr_Quiet(SecTrustCreateWithCertificates(tempCertificates, policy, &allowedTrust), _out);
|
||||
__Require_noErr_Quiet(SecTrustEvaluate(allowedTrust, &result), _out);
|
||||
|
||||
allowedPublicKey = (__bridge_transfer id)SecTrustCopyPublicKey(allowedTrust);
|
||||
|
||||
_out:
|
||||
if (allowedTrust) {
|
||||
CFRelease(allowedTrust);
|
||||
}
|
||||
|
||||
if (policy) {
|
||||
CFRelease(policy);
|
||||
}
|
||||
|
||||
if (tempCertificates) {
|
||||
CFRelease(tempCertificates);
|
||||
}
|
||||
|
||||
if (allowedCertificate) {
|
||||
CFRelease(allowedCertificate);
|
||||
}
|
||||
|
||||
return allowedPublicKey;
|
||||
}
|
||||
|
||||
static BOOL AFServerTrustIsValid(SecTrustRef serverTrust) {
|
||||
BOOL isValid = NO;
|
||||
SecTrustResultType result;
|
||||
__Require_noErr_Quiet(SecTrustEvaluate(serverTrust, &result), _out);
|
||||
|
||||
isValid = (result == kSecTrustResultUnspecified || result == kSecTrustResultProceed);
|
||||
|
||||
_out:
|
||||
return isValid;
|
||||
}
|
||||
|
||||
static NSArray * AFCertificateTrustChainForServerTrust(SecTrustRef serverTrust) {
|
||||
CFIndex certificateCount = SecTrustGetCertificateCount(serverTrust);
|
||||
NSMutableArray *trustChain = [NSMutableArray arrayWithCapacity:(NSUInteger)certificateCount];
|
||||
|
||||
for (CFIndex i = 0; i < certificateCount; i++) {
|
||||
SecCertificateRef certificate = SecTrustGetCertificateAtIndex(serverTrust, i);
|
||||
[trustChain addObject:(__bridge_transfer NSData *)SecCertificateCopyData(certificate)];
|
||||
}
|
||||
|
||||
return [NSArray arrayWithArray:trustChain];
|
||||
}
|
||||
|
||||
static NSArray * AFPublicKeyTrustChainForServerTrust(SecTrustRef serverTrust) {
|
||||
SecPolicyRef policy = SecPolicyCreateBasicX509();
|
||||
CFIndex certificateCount = SecTrustGetCertificateCount(serverTrust);
|
||||
NSMutableArray *trustChain = [NSMutableArray arrayWithCapacity:(NSUInteger)certificateCount];
|
||||
for (CFIndex i = 0; i < certificateCount; i++) {
|
||||
SecCertificateRef certificate = SecTrustGetCertificateAtIndex(serverTrust, i);
|
||||
|
||||
SecCertificateRef someCertificates[] = {certificate};
|
||||
CFArrayRef certificates = CFArrayCreate(NULL, (const void **)someCertificates, 1, NULL);
|
||||
|
||||
SecTrustRef trust;
|
||||
__Require_noErr_Quiet(SecTrustCreateWithCertificates(certificates, policy, &trust), _out);
|
||||
|
||||
SecTrustResultType result;
|
||||
__Require_noErr_Quiet(SecTrustEvaluate(trust, &result), _out);
|
||||
|
||||
[trustChain addObject:(__bridge_transfer id)SecTrustCopyPublicKey(trust)];
|
||||
|
||||
_out:
|
||||
if (trust) {
|
||||
CFRelease(trust);
|
||||
}
|
||||
|
||||
if (certificates) {
|
||||
CFRelease(certificates);
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
CFRelease(policy);
|
||||
|
||||
return [NSArray arrayWithArray:trustChain];
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
|
||||
@interface AFSecurityPolicy()
|
||||
@property (readwrite, nonatomic, assign) AFSSLPinningMode SSLPinningMode;
|
||||
@property (readwrite, nonatomic, strong) NSSet *pinnedPublicKeys;
|
||||
@end
|
||||
|
||||
@implementation AFSecurityPolicy
|
||||
|
||||
+ (NSSet *)certificatesInBundle:(NSBundle *)bundle {
|
||||
NSArray *paths = [bundle pathsForResourcesOfType:@"cer" inDirectory:@"."];
|
||||
|
||||
NSMutableSet *certificates = [NSMutableSet setWithCapacity:[paths count]];
|
||||
for (NSString *path in paths) {
|
||||
NSData *certificateData = [NSData dataWithContentsOfFile:path];
|
||||
[certificates addObject:certificateData];
|
||||
}
|
||||
|
||||
return [NSSet setWithSet:certificates];
|
||||
}
|
||||
|
||||
+ (NSSet *)defaultPinnedCertificates {
|
||||
static NSSet *_defaultPinnedCertificates = nil;
|
||||
static dispatch_once_t onceToken;
|
||||
dispatch_once(&onceToken, ^{
|
||||
NSBundle *bundle = [NSBundle bundleForClass:[self class]];
|
||||
_defaultPinnedCertificates = [self certificatesInBundle:bundle];
|
||||
});
|
||||
|
||||
return _defaultPinnedCertificates;
|
||||
}
|
||||
|
||||
+ (instancetype)defaultPolicy {
|
||||
AFSecurityPolicy *securityPolicy = [[self alloc] init];
|
||||
securityPolicy.SSLPinningMode = AFSSLPinningModeNone;
|
||||
|
||||
return securityPolicy;
|
||||
}
|
||||
|
||||
+ (instancetype)policyWithPinningMode:(AFSSLPinningMode)pinningMode {
|
||||
return [self policyWithPinningMode:pinningMode withPinnedCertificates:[self defaultPinnedCertificates]];
|
||||
}
|
||||
|
||||
+ (instancetype)policyWithPinningMode:(AFSSLPinningMode)pinningMode withPinnedCertificates:(NSSet *)pinnedCertificates {
|
||||
AFSecurityPolicy *securityPolicy = [[self alloc] init];
|
||||
securityPolicy.SSLPinningMode = pinningMode;
|
||||
|
||||
[securityPolicy setPinnedCertificates:pinnedCertificates];
|
||||
|
||||
return securityPolicy;
|
||||
}
|
||||
|
||||
- (instancetype)init {
|
||||
self = [super init];
|
||||
if (!self) {
|
||||
return nil;
|
||||
}
|
||||
|
||||
self.validatesDomainName = YES;
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)setPinnedCertificates:(NSSet *)pinnedCertificates {
|
||||
_pinnedCertificates = pinnedCertificates;
|
||||
|
||||
if (self.pinnedCertificates) {
|
||||
NSMutableSet *mutablePinnedPublicKeys = [NSMutableSet setWithCapacity:[self.pinnedCertificates count]];
|
||||
for (NSData *certificate in self.pinnedCertificates) {
|
||||
id publicKey = AFPublicKeyForCertificate(certificate);
|
||||
if (!publicKey) {
|
||||
continue;
|
||||
}
|
||||
[mutablePinnedPublicKeys addObject:publicKey];
|
||||
}
|
||||
self.pinnedPublicKeys = [NSSet setWithSet:mutablePinnedPublicKeys];
|
||||
} else {
|
||||
self.pinnedPublicKeys = nil;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
|
||||
- (BOOL)evaluateServerTrust:(SecTrustRef)serverTrust
|
||||
forDomain:(NSString *)domain
|
||||
{
|
||||
if (domain && self.allowInvalidCertificates && self.validatesDomainName && (self.SSLPinningMode == AFSSLPinningModeNone || [self.pinnedCertificates count] == 0)) {
|
||||
// https://developer.apple.com/library/mac/documentation/NetworkingInternet/Conceptual/NetworkingTopics/Articles/OverridingSSLChainValidationCorrectly.html
|
||||
// According to the docs, you should only trust your provided certs for evaluation.
|
||||
// Pinned certificates are added to the trust. Without pinned certificates,
|
||||
// there is nothing to evaluate against.
|
||||
//
|
||||
// From Apple Docs:
|
||||
// "Do not implicitly trust self-signed certificates as anchors (kSecTrustOptionImplicitAnchors).
|
||||
// Instead, add your own (self-signed) CA certificate to the list of trusted anchors."
|
||||
NSLog(@"In order to validate a domain name for self signed certificates, you MUST use pinning.");
|
||||
return NO;
|
||||
}
|
||||
|
||||
NSMutableArray *policies = [NSMutableArray array];
|
||||
if (self.validatesDomainName) {
|
||||
[policies addObject:(__bridge_transfer id)SecPolicyCreateSSL(true, (__bridge CFStringRef)domain)];
|
||||
} else {
|
||||
[policies addObject:(__bridge_transfer id)SecPolicyCreateBasicX509()];
|
||||
}
|
||||
|
||||
SecTrustSetPolicies(serverTrust, (__bridge CFArrayRef)policies);
|
||||
|
||||
if (self.SSLPinningMode == AFSSLPinningModeNone) {
|
||||
return self.allowInvalidCertificates || AFServerTrustIsValid(serverTrust);
|
||||
} else if (!AFServerTrustIsValid(serverTrust) && !self.allowInvalidCertificates) {
|
||||
return NO;
|
||||
}
|
||||
|
||||
switch (self.SSLPinningMode) {
|
||||
case AFSSLPinningModeNone:
|
||||
default:
|
||||
return NO;
|
||||
case AFSSLPinningModeCertificate: {
|
||||
NSMutableArray *pinnedCertificates = [NSMutableArray array];
|
||||
for (NSData *certificateData in self.pinnedCertificates) {
|
||||
[pinnedCertificates addObject:(__bridge_transfer id)SecCertificateCreateWithData(NULL, (__bridge CFDataRef)certificateData)];
|
||||
}
|
||||
SecTrustSetAnchorCertificates(serverTrust, (__bridge CFArrayRef)pinnedCertificates);
|
||||
|
||||
if (!AFServerTrustIsValid(serverTrust)) {
|
||||
return NO;
|
||||
}
|
||||
|
||||
// obtain the chain after being validated, which *should* contain the pinned certificate in the last position (if it's the Root CA)
|
||||
NSArray *serverCertificates = AFCertificateTrustChainForServerTrust(serverTrust);
|
||||
|
||||
for (NSData *trustChainCertificate in [serverCertificates reverseObjectEnumerator]) {
|
||||
if ([self.pinnedCertificates containsObject:trustChainCertificate]) {
|
||||
return YES;
|
||||
}
|
||||
}
|
||||
|
||||
return NO;
|
||||
}
|
||||
case AFSSLPinningModePublicKey: {
|
||||
NSUInteger trustedPublicKeyCount = 0;
|
||||
NSArray *publicKeys = AFPublicKeyTrustChainForServerTrust(serverTrust);
|
||||
|
||||
for (id trustChainPublicKey in publicKeys) {
|
||||
for (id pinnedPublicKey in self.pinnedPublicKeys) {
|
||||
if (AFSecKeyIsEqualToKey((__bridge SecKeyRef)trustChainPublicKey, (__bridge SecKeyRef)pinnedPublicKey)) {
|
||||
trustedPublicKeyCount += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
return trustedPublicKeyCount > 0;
|
||||
}
|
||||
}
|
||||
|
||||
return NO;
|
||||
}
|
||||
|
||||
#pragma mark - NSKeyValueObserving
|
||||
|
||||
+ (NSSet *)keyPathsForValuesAffectingPinnedPublicKeys {
|
||||
return [NSSet setWithObject:@"pinnedCertificates"];
|
||||
}
|
||||
|
||||
#pragma mark - NSSecureCoding
|
||||
|
||||
+ (BOOL)supportsSecureCoding {
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (instancetype)initWithCoder:(NSCoder *)decoder {
|
||||
|
||||
self = [self init];
|
||||
if (!self) {
|
||||
return nil;
|
||||
}
|
||||
|
||||
self.SSLPinningMode = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(SSLPinningMode))] unsignedIntegerValue];
|
||||
self.allowInvalidCertificates = [decoder decodeBoolForKey:NSStringFromSelector(@selector(allowInvalidCertificates))];
|
||||
self.validatesDomainName = [decoder decodeBoolForKey:NSStringFromSelector(@selector(validatesDomainName))];
|
||||
self.pinnedCertificates = [decoder decodeObjectOfClass:[NSArray class] forKey:NSStringFromSelector(@selector(pinnedCertificates))];
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)encodeWithCoder:(NSCoder *)coder {
|
||||
[coder encodeObject:[NSNumber numberWithUnsignedInteger:self.SSLPinningMode] forKey:NSStringFromSelector(@selector(SSLPinningMode))];
|
||||
[coder encodeBool:self.allowInvalidCertificates forKey:NSStringFromSelector(@selector(allowInvalidCertificates))];
|
||||
[coder encodeBool:self.validatesDomainName forKey:NSStringFromSelector(@selector(validatesDomainName))];
|
||||
[coder encodeObject:self.pinnedCertificates forKey:NSStringFromSelector(@selector(pinnedCertificates))];
|
||||
}
|
||||
|
||||
#pragma mark - NSCopying
|
||||
|
||||
- (instancetype)copyWithZone:(NSZone *)zone {
|
||||
AFSecurityPolicy *securityPolicy = [[[self class] allocWithZone:zone] init];
|
||||
securityPolicy.SSLPinningMode = self.SSLPinningMode;
|
||||
securityPolicy.allowInvalidCertificates = self.allowInvalidCertificates;
|
||||
securityPolicy.validatesDomainName = self.validatesDomainName;
|
||||
securityPolicy.pinnedCertificates = [self.pinnedCertificates copyWithZone:zone];
|
||||
|
||||
return securityPolicy;
|
||||
}
|
||||
|
||||
@end
|
@ -1,479 +0,0 @@
|
||||
// AFURLRequestSerialization.h
|
||||
// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <TargetConditionals.h>
|
||||
|
||||
#if TARGET_OS_IOS || TARGET_OS_TV
|
||||
#import <UIKit/UIKit.h>
|
||||
#elif TARGET_OS_WATCH
|
||||
#import <WatchKit/WatchKit.h>
|
||||
#endif
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
Returns a percent-escaped string following RFC 3986 for a query string key or value.
|
||||
RFC 3986 states that the following characters are "reserved" characters.
|
||||
- General Delimiters: ":", "#", "[", "]", "@", "?", "/"
|
||||
- Sub-Delimiters: "!", "$", "&", "'", "(", ")", "*", "+", ",", ";", "="
|
||||
|
||||
In RFC 3986 - Section 3.4, it states that the "?" and "/" characters should not be escaped to allow
|
||||
query strings to include a URL. Therefore, all "reserved" characters with the exception of "?" and "/"
|
||||
should be percent-escaped in the query string.
|
||||
|
||||
@param string The string to be percent-escaped.
|
||||
|
||||
@return The percent-escaped string.
|
||||
*/
|
||||
FOUNDATION_EXPORT NSString * AFPercentEscapedStringFromString(NSString *string);
|
||||
|
||||
/**
|
||||
A helper method to generate encoded url query parameters for appending to the end of a URL.
|
||||
|
||||
@param parameters A dictionary of key/values to be encoded.
|
||||
|
||||
@return A url encoded query string
|
||||
*/
|
||||
FOUNDATION_EXPORT NSString * AFQueryStringFromParameters(NSDictionary *parameters);
|
||||
|
||||
/**
|
||||
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 <NSObject, NSSecureCoding, NSCopying>
|
||||
|
||||
/**
|
||||
Returns a request with the specified parameters encoded into a copy of the original request.
|
||||
|
||||
@param request The original request.
|
||||
@param parameters The parameters to be encoded.
|
||||
@param error The error that occurred while attempting to encode the request parameters.
|
||||
|
||||
@return A serialized request.
|
||||
*/
|
||||
- (nullable NSURLRequest *)requestBySerializingRequest:(NSURLRequest *)request
|
||||
withParameters:(nullable id)parameters
|
||||
error:(NSError * _Nullable __autoreleasing *)error NS_SWIFT_NOTHROW;
|
||||
|
||||
@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 <AFURLRequestSerialization>
|
||||
|
||||
/**
|
||||
The string encoding used to serialize parameters. `NSUTF8StringEncoding` by default.
|
||||
*/
|
||||
@property (nonatomic, assign) NSStringEncoding stringEncoding;
|
||||
|
||||
/**
|
||||
Whether created requests can use the device’s cellular radio (if present). `YES` by default.
|
||||
|
||||
@see NSMutableURLRequest -setAllowsCellularAccess:
|
||||
*/
|
||||
@property (nonatomic, assign) BOOL allowsCellularAccess;
|
||||
|
||||
/**
|
||||
The cache policy of created requests. `NSURLRequestUseProtocolCachePolicy` by default.
|
||||
|
||||
@see NSMutableURLRequest -setCachePolicy:
|
||||
*/
|
||||
@property (nonatomic, assign) NSURLRequestCachePolicy cachePolicy;
|
||||
|
||||
/**
|
||||
Whether created requests should use the default cookie handling. `YES` by default.
|
||||
|
||||
@see NSMutableURLRequest -setHTTPShouldHandleCookies:
|
||||
*/
|
||||
@property (nonatomic, assign) BOOL HTTPShouldHandleCookies;
|
||||
|
||||
/**
|
||||
Whether created requests can continue transmitting data before receiving a response from an earlier transmission. `NO` by default
|
||||
|
||||
@see NSMutableURLRequest -setHTTPShouldUsePipelining:
|
||||
*/
|
||||
@property (nonatomic, assign) BOOL HTTPShouldUsePipelining;
|
||||
|
||||
/**
|
||||
The network service type for created requests. `NSURLNetworkServiceTypeDefault` by default.
|
||||
|
||||
@see NSMutableURLRequest -setNetworkServiceType:
|
||||
*/
|
||||
@property (nonatomic, assign) NSURLRequestNetworkServiceType networkServiceType;
|
||||
|
||||
/**
|
||||
The timeout interval, in seconds, for created requests. The default timeout interval is 60 seconds.
|
||||
|
||||
@see NSMutableURLRequest -setTimeoutInterval:
|
||||
*/
|
||||
@property (nonatomic, assign) NSTimeInterval timeoutInterval;
|
||||
|
||||
///---------------------------------------
|
||||
/// @name Configuring HTTP Request Headers
|
||||
///---------------------------------------
|
||||
|
||||
/**
|
||||
Default HTTP header field values to be applied to serialized requests. By default, these include the following:
|
||||
|
||||
- `Accept-Language` with the contents of `NSLocale +preferredLanguages`
|
||||
- `User-Agent` with the contents of various bundle identifiers and OS designations
|
||||
|
||||
@discussion To add or remove default request headers, use `setValue:forHTTPHeaderField:`.
|
||||
*/
|
||||
@property (readonly, nonatomic, strong) NSDictionary <NSString *, NSString *> *HTTPRequestHeaders;
|
||||
|
||||
/**
|
||||
Creates and returns a serializer with default configuration.
|
||||
*/
|
||||
+ (instancetype)serializer;
|
||||
|
||||
/**
|
||||
Sets the value for the HTTP headers set in request objects made by the HTTP client. If `nil`, removes the existing value for that header.
|
||||
|
||||
@param field The HTTP header to set a default value for
|
||||
@param value The value set as default for the specified header, or `nil`
|
||||
*/
|
||||
- (void)setValue:(nullable NSString *)value
|
||||
forHTTPHeaderField:(NSString *)field;
|
||||
|
||||
/**
|
||||
Returns the value for the HTTP headers set in the request serializer.
|
||||
|
||||
@param field The HTTP header to retrieve the default value for
|
||||
|
||||
@return The value set as default for the specified header, or `nil`
|
||||
*/
|
||||
- (nullable NSString *)valueForHTTPHeaderField:(NSString *)field;
|
||||
|
||||
/**
|
||||
Sets the "Authorization" HTTP header set in request objects made by the HTTP client to a basic authentication value with Base64-encoded username and password. This overwrites any existing value for this header.
|
||||
|
||||
@param username The HTTP basic auth username
|
||||
@param password The HTTP basic auth password
|
||||
*/
|
||||
- (void)setAuthorizationHeaderFieldWithUsername:(NSString *)username
|
||||
password:(NSString *)password;
|
||||
|
||||
/**
|
||||
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 <NSString *> *HTTPMethodsEncodingParametersInURI;
|
||||
|
||||
/**
|
||||
Set the method of query string serialization according to one of the pre-defined styles.
|
||||
|
||||
@param style The serialization style.
|
||||
|
||||
@see AFHTTPRequestQueryStringSerializationStyle
|
||||
*/
|
||||
- (void)setQueryStringSerializationWithStyle:(AFHTTPRequestQueryStringSerializationStyle)style;
|
||||
|
||||
/**
|
||||
Set the a custom method of query string serialization according to the specified block.
|
||||
|
||||
@param block A block that defines a process of encoding parameters into a query string. This block returns the query string and takes three arguments: the request, the parameters to encode, and the error that occurred when attempting to encode parameters for the given request.
|
||||
*/
|
||||
- (void)setQueryStringSerializationWithBlock:(nullable NSString * (^)(NSURLRequest *request, id parameters, NSError * __autoreleasing *error))block;
|
||||
|
||||
///-------------------------------
|
||||
/// @name Creating Request Objects
|
||||
///-------------------------------
|
||||
|
||||
/**
|
||||
Creates an `NSMutableURLRequest` object with the specified HTTP method and URL string.
|
||||
|
||||
If the HTTP method is `GET`, `HEAD`, or `DELETE`, the parameters will be used to construct a url-encoded query string that is appended to the request's URL. Otherwise, the parameters will be encoded according to the value of the `parameterEncoding` property, and set as the request body.
|
||||
|
||||
@param method The HTTP method for the request, such as `GET`, `POST`, `PUT`, or `DELETE`. This parameter must not be `nil`.
|
||||
@param URLString The URL string used to create the request URL.
|
||||
@param parameters The parameters to be either set as a query string for `GET` requests, or the request HTTP body.
|
||||
@param error The error that occurred while constructing the request.
|
||||
|
||||
@return An `NSMutableURLRequest` object.
|
||||
*/
|
||||
- (NSMutableURLRequest *)requestWithMethod:(NSString *)method
|
||||
URLString:(NSString *)URLString
|
||||
parameters:(nullable id)parameters
|
||||
error:(NSError * _Nullable __autoreleasing *)error;
|
||||
|
||||
/**
|
||||
Creates an `NSMutableURLRequest` object with the specified HTTP method and URLString, and constructs a `multipart/form-data` HTTP body, using the specified parameters and multipart form data block. See http://www.w3.org/TR/html4/interact/forms.html#h-17.13.4.2
|
||||
|
||||
Multipart form requests are automatically streamed, reading files directly from disk along with in-memory data in a single HTTP body. The resulting `NSMutableURLRequest` object has an `HTTPBodyStream` property, so refrain from setting `HTTPBodyStream` or `HTTPBody` on this request object, as it will clear out the multipart form body stream.
|
||||
|
||||
@param method The HTTP method for the request. This parameter must not be `GET` or `HEAD`, or `nil`.
|
||||
@param URLString The URL string used to create the request URL.
|
||||
@param parameters The parameters to be encoded and set in the request HTTP body.
|
||||
@param block A block that takes a single argument and appends data to the HTTP body. The block argument is an object adopting the `AFMultipartFormData` protocol.
|
||||
@param error The error that occurred while constructing the request.
|
||||
|
||||
@return An `NSMutableURLRequest` object
|
||||
*/
|
||||
- (NSMutableURLRequest *)multipartFormRequestWithMethod:(NSString *)method
|
||||
URLString:(NSString *)URLString
|
||||
parameters:(nullable NSDictionary <NSString *, id> *)parameters
|
||||
constructingBodyWithBlock:(nullable void (^)(id <AFMultipartFormData> formData))block
|
||||
error:(NSError * _Nullable __autoreleasing *)error;
|
||||
|
||||
/**
|
||||
Creates an `NSMutableURLRequest` by removing the `HTTPBodyStream` from a request, and asynchronously writing its contents into the specified file, invoking the completion handler when finished.
|
||||
|
||||
@param request The multipart form request. The `HTTPBodyStream` property of `request` must not be `nil`.
|
||||
@param fileURL The file URL to write multipart form contents to.
|
||||
@param handler A handler block to execute.
|
||||
|
||||
@discussion There is a bug in `NSURLSessionTask` that causes requests to not send a `Content-Length` header when streaming contents from an HTTP body, which is notably problematic when interacting with the Amazon S3 webservice. As a workaround, this method takes a request constructed with `multipartFormRequestWithMethod:URLString:parameters:constructingBodyWithBlock:error:`, or any other request with an `HTTPBodyStream`, writes the contents to the specified file and returns a copy of the original request with the `HTTPBodyStream` property set to `nil`. From here, the file can either be passed to `AFURLSessionManager -uploadTaskWithRequest:fromFile:progress:completionHandler:`, or have its contents read into an `NSData` that's assigned to the `HTTPBody` property of the request.
|
||||
|
||||
@see https://github.com/AFNetworking/AFNetworking/issues/1398
|
||||
*/
|
||||
- (NSMutableURLRequest *)requestWithMultipartFormRequest:(NSURLRequest *)request
|
||||
writingStreamContentsToFile:(NSURL *)fileURL
|
||||
completionHandler:(nullable void (^)(NSError * _Nullable error))handler;
|
||||
|
||||
@end
|
||||
|
||||
#pragma mark -
|
||||
|
||||
/**
|
||||
The `AFMultipartFormData` protocol defines the methods supported by the parameter in the block argument of `AFHTTPRequestSerializer -multipartFormRequestWithMethod:URLString:parameters:constructingBodyWithBlock:`.
|
||||
*/
|
||||
@protocol AFMultipartFormData
|
||||
|
||||
/**
|
||||
Appends the HTTP header `Content-Disposition: file; filename=#{generated filename}; name=#{name}"` and `Content-Type: #{generated mimeType}`, followed by the encoded file data and the multipart form boundary.
|
||||
|
||||
The filename and MIME type for this data in the form will be automatically generated, using the last path component of the `fileURL` and system associated MIME type for the `fileURL` extension, respectively.
|
||||
|
||||
@param fileURL The URL corresponding to the file whose content will be appended to the form. This parameter must not be `nil`.
|
||||
@param name The name to be associated with the specified data. This parameter must not be `nil`.
|
||||
@param error If an error occurs, upon return contains an `NSError` object that describes the problem.
|
||||
|
||||
@return `YES` if the file data was successfully appended, otherwise `NO`.
|
||||
*/
|
||||
- (BOOL)appendPartWithFileURL:(NSURL *)fileURL
|
||||
name:(NSString *)name
|
||||
error:(NSError * _Nullable __autoreleasing *)error;
|
||||
|
||||
/**
|
||||
Appends the HTTP header `Content-Disposition: file; filename=#{filename}; name=#{name}"` and `Content-Type: #{mimeType}`, followed by the encoded file data and the multipart form boundary.
|
||||
|
||||
@param fileURL The URL corresponding to the file whose content will be appended to the form. This parameter must not be `nil`.
|
||||
@param name The name to be associated with the specified data. This parameter must not be `nil`.
|
||||
@param fileName The file name to be used in the `Content-Disposition` header. This parameter must not be `nil`.
|
||||
@param mimeType The declared MIME type of the file data. This parameter must not be `nil`.
|
||||
@param error If an error occurs, upon return contains an `NSError` object that describes the problem.
|
||||
|
||||
@return `YES` if the file data was successfully appended otherwise `NO`.
|
||||
*/
|
||||
- (BOOL)appendPartWithFileURL:(NSURL *)fileURL
|
||||
name:(NSString *)name
|
||||
fileName:(NSString *)fileName
|
||||
mimeType:(NSString *)mimeType
|
||||
error:(NSError * _Nullable __autoreleasing *)error;
|
||||
|
||||
/**
|
||||
Appends the HTTP header `Content-Disposition: file; filename=#{filename}; name=#{name}"` and `Content-Type: #{mimeType}`, followed by the data from the input stream and the multipart form boundary.
|
||||
|
||||
@param inputStream The input stream to be appended to the form data
|
||||
@param name The name to be associated with the specified input stream. This parameter must not be `nil`.
|
||||
@param fileName The filename to be associated with the specified input stream. This parameter must not be `nil`.
|
||||
@param length The length of the specified input stream in bytes.
|
||||
@param mimeType The MIME type of the specified data. (For example, the MIME type for a JPEG image is image/jpeg.) For a list of valid MIME types, see http://www.iana.org/assignments/media-types/. This parameter must not be `nil`.
|
||||
*/
|
||||
- (void)appendPartWithInputStream:(nullable NSInputStream *)inputStream
|
||||
name:(NSString *)name
|
||||
fileName:(NSString *)fileName
|
||||
length:(int64_t)length
|
||||
mimeType:(NSString *)mimeType;
|
||||
|
||||
/**
|
||||
Appends the HTTP header `Content-Disposition: file; filename=#{filename}; name=#{name}"` and `Content-Type: #{mimeType}`, followed by the encoded file data and the multipart form boundary.
|
||||
|
||||
@param data The data to be encoded and appended to the form data.
|
||||
@param name The name to be associated with the specified data. This parameter must not be `nil`.
|
||||
@param fileName The filename to be associated with the specified data. This parameter must not be `nil`.
|
||||
@param mimeType The MIME type of the specified data. (For example, the MIME type for a JPEG image is image/jpeg.) For a list of valid MIME types, see http://www.iana.org/assignments/media-types/. This parameter must not be `nil`.
|
||||
*/
|
||||
- (void)appendPartWithFileData:(NSData *)data
|
||||
name:(NSString *)name
|
||||
fileName:(NSString *)fileName
|
||||
mimeType:(NSString *)mimeType;
|
||||
|
||||
/**
|
||||
Appends the HTTP headers `Content-Disposition: form-data; name=#{name}"`, followed by the encoded data and the multipart form boundary.
|
||||
|
||||
@param data The data to be encoded and appended to the form data.
|
||||
@param name The name to be associated with the specified data. This parameter must not be `nil`.
|
||||
*/
|
||||
|
||||
- (void)appendPartWithFormData:(NSData *)data
|
||||
name:(NSString *)name;
|
||||
|
||||
|
||||
/**
|
||||
Appends HTTP headers, followed by the encoded data and the multipart form boundary.
|
||||
|
||||
@param headers The HTTP headers to be appended to the form data.
|
||||
@param body The data to be encoded and appended to the form data. This parameter must not be `nil`.
|
||||
*/
|
||||
- (void)appendPartWithHeaders:(nullable NSDictionary <NSString *, NSString *> *)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`.
|
||||
*/
|
||||
FOUNDATION_EXPORT 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`.
|
||||
*/
|
||||
FOUNDATION_EXPORT 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.
|
||||
*/
|
||||
FOUNDATION_EXPORT NSUInteger const kAFUploadStream3GSuggestedPacketSize;
|
||||
FOUNDATION_EXPORT NSTimeInterval const kAFUploadStream3GSuggestedDelay;
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
1376
Pods/AFNetworking/AFNetworking/AFURLRequestSerialization.m
generated
1376
Pods/AFNetworking/AFNetworking/AFURLRequestSerialization.m
generated
File diff suppressed because it is too large
Load Diff
@ -1,311 +0,0 @@
|
||||
// AFURLResponseSerialization.h
|
||||
// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <CoreGraphics/CoreGraphics.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
The `AFURLResponseSerialization` protocol is adopted by an object that decodes data into a more useful object representation, according to details in the server response. Response serializers may additionally perform validation on the incoming response and data.
|
||||
|
||||
For example, a JSON response serializer may check for an acceptable status code (`2XX` range) and content type (`application/json`), decoding a valid JSON response into an object.
|
||||
*/
|
||||
@protocol AFURLResponseSerialization <NSObject, NSSecureCoding, NSCopying>
|
||||
|
||||
/**
|
||||
The response object decoded from the data associated with a specified response.
|
||||
|
||||
@param response The response to be processed.
|
||||
@param data The response data to be decoded.
|
||||
@param error The error that occurred while attempting to decode the response data.
|
||||
|
||||
@return The object decoded from the specified response data.
|
||||
*/
|
||||
- (nullable id)responseObjectForResponse:(nullable NSURLResponse *)response
|
||||
data:(nullable NSData *)data
|
||||
error:(NSError * _Nullable __autoreleasing *)error NS_SWIFT_NOTHROW;
|
||||
|
||||
@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 <AFURLResponseSerialization>
|
||||
|
||||
- (instancetype)init;
|
||||
|
||||
/**
|
||||
The string encoding used to serialize data received from the server, when no string encoding is specified by the response. `NSUTF8StringEncoding` by default.
|
||||
*/
|
||||
@property (nonatomic, assign) NSStringEncoding stringEncoding;
|
||||
|
||||
/**
|
||||
Creates and returns a serializer with default configuration.
|
||||
*/
|
||||
+ (instancetype)serializer;
|
||||
|
||||
///-----------------------------------------
|
||||
/// @name Configuring Response Serialization
|
||||
///-----------------------------------------
|
||||
|
||||
/**
|
||||
The acceptable HTTP status codes for responses. When non-`nil`, responses with status codes not contained by the set will result in an error during validation.
|
||||
|
||||
See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
|
||||
*/
|
||||
@property (nonatomic, copy, nullable) NSIndexSet *acceptableStatusCodes;
|
||||
|
||||
/**
|
||||
The acceptable MIME types for responses. When non-`nil`, responses with a `Content-Type` with MIME types that do not intersect with the set will result in an error during validation.
|
||||
*/
|
||||
@property (nonatomic, copy, nullable) NSSet <NSString *> *acceptableContentTypes;
|
||||
|
||||
/**
|
||||
Validates the specified response and data.
|
||||
|
||||
In its base implementation, this method checks for an acceptable status code and content type. Subclasses may wish to add other domain-specific checks.
|
||||
|
||||
@param response The response to be validated.
|
||||
@param data The data associated with the response.
|
||||
@param error The error that occurred while attempting to validate the response.
|
||||
|
||||
@return `YES` if the response is valid, otherwise `NO`.
|
||||
*/
|
||||
- (BOOL)validateResponse:(nullable NSHTTPURLResponse *)response
|
||||
data:(nullable NSData *)data
|
||||
error:(NSError * _Nullable __autoreleasing *)error;
|
||||
|
||||
@end
|
||||
|
||||
#pragma mark -
|
||||
|
||||
|
||||
/**
|
||||
`AFJSONResponseSerializer` is a subclass of `AFHTTPResponseSerializer` that validates and decodes JSON responses.
|
||||
|
||||
By default, `AFJSONResponseSerializer` accepts the following MIME types, which includes the official standard, `application/json`, as well as other commonly-used types:
|
||||
|
||||
- `application/json`
|
||||
- `text/json`
|
||||
- `text/javascript`
|
||||
*/
|
||||
@interface AFJSONResponseSerializer : AFHTTPResponseSerializer
|
||||
|
||||
- (instancetype)init;
|
||||
|
||||
/**
|
||||
Options for reading the response JSON data and creating the Foundation objects. For possible values, see the `NSJSONSerialization` documentation section "NSJSONReadingOptions". `0` by default.
|
||||
*/
|
||||
@property (nonatomic, assign) NSJSONReadingOptions readingOptions;
|
||||
|
||||
/**
|
||||
Whether to remove keys with `NSNull` values from response JSON. Defaults to `NO`.
|
||||
*/
|
||||
@property (nonatomic, assign) BOOL removesKeysWithNullValues;
|
||||
|
||||
/**
|
||||
Creates and returns a JSON serializer with specified reading and writing options.
|
||||
|
||||
@param readingOptions The specified JSON reading options.
|
||||
*/
|
||||
+ (instancetype)serializerWithReadingOptions:(NSJSONReadingOptions)readingOptions;
|
||||
|
||||
@end
|
||||
|
||||
#pragma mark -
|
||||
|
||||
/**
|
||||
`AFXMLParserResponseSerializer` is a subclass of `AFHTTPResponseSerializer` that validates and decodes XML responses as an `NSXMLParser` objects.
|
||||
|
||||
By default, `AFXMLParserResponseSerializer` accepts the following MIME types, which includes the official standard, `application/xml`, as well as other commonly-used types:
|
||||
|
||||
- `application/xml`
|
||||
- `text/xml`
|
||||
*/
|
||||
@interface AFXMLParserResponseSerializer : AFHTTPResponseSerializer
|
||||
|
||||
@end
|
||||
|
||||
#pragma mark -
|
||||
|
||||
#ifdef __MAC_OS_X_VERSION_MIN_REQUIRED
|
||||
|
||||
/**
|
||||
`AFXMLDocumentResponseSerializer` is a subclass of `AFHTTPResponseSerializer` that validates and decodes XML responses as an `NSXMLDocument` objects.
|
||||
|
||||
By default, `AFXMLDocumentResponseSerializer` accepts the following MIME types, which includes the official standard, `application/xml`, as well as other commonly-used types:
|
||||
|
||||
- `application/xml`
|
||||
- `text/xml`
|
||||
*/
|
||||
@interface AFXMLDocumentResponseSerializer : AFHTTPResponseSerializer
|
||||
|
||||
- (instancetype)init;
|
||||
|
||||
/**
|
||||
Input and output options specifically intended for `NSXMLDocument` objects. For possible values, see the `NSJSONSerialization` documentation section "NSJSONReadingOptions". `0` by default.
|
||||
*/
|
||||
@property (nonatomic, assign) NSUInteger options;
|
||||
|
||||
/**
|
||||
Creates and returns an XML document serializer with the specified options.
|
||||
|
||||
@param mask The XML document options.
|
||||
*/
|
||||
+ (instancetype)serializerWithXMLDocumentOptions:(NSUInteger)mask;
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
|
||||
#pragma mark -
|
||||
|
||||
/**
|
||||
`AFPropertyListResponseSerializer` is a subclass of `AFHTTPResponseSerializer` that validates and decodes XML responses as an `NSXMLDocument` objects.
|
||||
|
||||
By default, `AFPropertyListResponseSerializer` accepts the following MIME types:
|
||||
|
||||
- `application/x-plist`
|
||||
*/
|
||||
@interface AFPropertyListResponseSerializer : AFHTTPResponseSerializer
|
||||
|
||||
- (instancetype)init;
|
||||
|
||||
/**
|
||||
The property list format. Possible values are described in "NSPropertyListFormat".
|
||||
*/
|
||||
@property (nonatomic, assign) NSPropertyListFormat format;
|
||||
|
||||
/**
|
||||
The property list reading options. Possible values are described in "NSPropertyListMutabilityOptions."
|
||||
*/
|
||||
@property (nonatomic, assign) NSPropertyListReadOptions readOptions;
|
||||
|
||||
/**
|
||||
Creates and returns a property list serializer with a specified format, read options, and write options.
|
||||
|
||||
@param format The property list format.
|
||||
@param readOptions The property list reading options.
|
||||
*/
|
||||
+ (instancetype)serializerWithFormat:(NSPropertyListFormat)format
|
||||
readOptions:(NSPropertyListReadOptions)readOptions;
|
||||
|
||||
@end
|
||||
|
||||
#pragma mark -
|
||||
|
||||
/**
|
||||
`AFImageResponseSerializer` is a subclass of `AFHTTPResponseSerializer` that validates and decodes image responses.
|
||||
|
||||
By default, `AFImageResponseSerializer` accepts the following MIME types, which correspond to the image formats supported by UIImage or NSImage:
|
||||
|
||||
- `image/tiff`
|
||||
- `image/jpeg`
|
||||
- `image/gif`
|
||||
- `image/png`
|
||||
- `image/ico`
|
||||
- `image/x-icon`
|
||||
- `image/bmp`
|
||||
- `image/x-bmp`
|
||||
- `image/x-xbitmap`
|
||||
- `image/x-win-bitmap`
|
||||
*/
|
||||
@interface AFImageResponseSerializer : AFHTTPResponseSerializer
|
||||
|
||||
#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_WATCH
|
||||
/**
|
||||
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 <id<AFURLResponseSerialization>> *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 <id<AFURLResponseSerialization>> *)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`.
|
||||
*/
|
||||
FOUNDATION_EXPORT 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`.
|
||||
*/
|
||||
FOUNDATION_EXPORT NSString * const AFNetworkingOperationFailingURLResponseErrorKey;
|
||||
|
||||
FOUNDATION_EXPORT NSString * const AFNetworkingOperationFailingURLResponseDataErrorKey;
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@ -1,805 +0,0 @@
|
||||
// AFURLResponseSerialization.m
|
||||
// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
#import "AFURLResponseSerialization.h"
|
||||
|
||||
#import <TargetConditionals.h>
|
||||
|
||||
#if TARGET_OS_IOS
|
||||
#import <UIKit/UIKit.h>
|
||||
#elif TARGET_OS_WATCH
|
||||
#import <WatchKit/WatchKit.h>
|
||||
#elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED)
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#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 <NSCopying> key in [(NSDictionary *)JSONObject allKeys]) {
|
||||
id value = (NSDictionary *)JSONObject[key];
|
||||
if (!value || [value isEqual:[NSNull null]]) {
|
||||
[mutableDictionary removeObjectForKey:key];
|
||||
} else if ([value isKindOfClass:[NSArray class]] || [value isKindOfClass:[NSDictionary class]]) {
|
||||
mutableDictionary[key] = AFJSONObjectByRemovingKeysWithNullValues(value, readingOptions);
|
||||
}
|
||||
}
|
||||
|
||||
return (readingOptions & NSJSONReadingMutableContainers) ? mutableDictionary : [NSDictionary dictionaryWithDictionary:mutableDictionary];
|
||||
}
|
||||
|
||||
return JSONObject;
|
||||
}
|
||||
|
||||
@implementation AFHTTPResponseSerializer
|
||||
|
||||
+ (instancetype)serializer {
|
||||
return [[self alloc] init];
|
||||
}
|
||||
|
||||
- (instancetype)init {
|
||||
self = [super init];
|
||||
if (!self) {
|
||||
return nil;
|
||||
}
|
||||
|
||||
self.stringEncoding = NSUTF8StringEncoding;
|
||||
|
||||
self.acceptableStatusCodes = [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(200, 100)];
|
||||
self.acceptableContentTypes = nil;
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
|
||||
- (BOOL)validateResponse:(NSHTTPURLResponse *)response
|
||||
data:(NSData *)data
|
||||
error:(NSError * __autoreleasing *)error
|
||||
{
|
||||
BOOL responseIsValid = YES;
|
||||
NSError *validationError = nil;
|
||||
|
||||
if (response && [response isKindOfClass:[NSHTTPURLResponse class]]) {
|
||||
if (self.acceptableContentTypes && ![self.acceptableContentTypes containsObject:[response MIMEType]] &&
|
||||
!([response MIMEType] == nil && [data length] == 0)) {
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
- (instancetype)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
|
||||
|
||||
- (instancetype)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;
|
||||
}
|
||||
}
|
||||
|
||||
id responseObject = nil;
|
||||
NSError *serializationError = 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
|
||||
BOOL isSpace = [data isEqualToData:[NSData dataWithBytes:" " length:1]];
|
||||
if (data.length > 0 && !isSpace) {
|
||||
responseObject = [NSJSONSerialization JSONObjectWithData:data options:self.readingOptions error:&serializationError];
|
||||
} else {
|
||||
return nil;
|
||||
}
|
||||
|
||||
if (self.removesKeysWithNullValues && responseObject) {
|
||||
responseObject = AFJSONObjectByRemovingKeysWithNullValues(responseObject, self.readingOptions);
|
||||
}
|
||||
|
||||
if (error) {
|
||||
*error = AFErrorWithUnderlyingError(serializationError, *error);
|
||||
}
|
||||
|
||||
return responseObject;
|
||||
}
|
||||
|
||||
#pragma mark - NSSecureCoding
|
||||
|
||||
- (instancetype)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
|
||||
|
||||
- (instancetype)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
|
||||
|
||||
- (instancetype)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
|
||||
|
||||
- (instancetype)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
|
||||
|
||||
- (instancetype)initWithCoder:(NSCoder *)decoder {
|
||||
self = [super initWithCoder:decoder];
|
||||
if (!self) {
|
||||
return nil;
|
||||
}
|
||||
|
||||
self.format = (NSPropertyListFormat)[[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
|
||||
|
||||
- (instancetype)copyWithZone:(NSZone *)zone {
|
||||
AFPropertyListResponseSerializer *serializer = [[[self class] allocWithZone:zone] init];
|
||||
serializer.format = self.format;
|
||||
serializer.readOptions = self.readOptions;
|
||||
|
||||
return serializer;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
#pragma mark -
|
||||
|
||||
#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_WATCH
|
||||
#import <CoreGraphics/CoreGraphics.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface UIImage (AFNetworkingSafeImageLoading)
|
||||
+ (UIImage *)af_safeImageWithData:(NSData *)data;
|
||||
@end
|
||||
|
||||
static NSLock* imageLock = nil;
|
||||
|
||||
@implementation UIImage (AFNetworkingSafeImageLoading)
|
||||
|
||||
+ (UIImage *)af_safeImageWithData:(NSData *)data {
|
||||
UIImage* image = nil;
|
||||
static dispatch_once_t onceToken;
|
||||
dispatch_once(&onceToken, ^{
|
||||
imageLock = [[NSLock alloc] init];
|
||||
});
|
||||
|
||||
[imageLock lock];
|
||||
image = [UIImage imageWithData:data];
|
||||
[imageLock unlock];
|
||||
return image;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
static UIImage * AFImageWithDataAtScale(NSData *data, CGFloat scale) {
|
||||
UIImage *image = [UIImage af_safeImageWithData:data];
|
||||
if (image.images) {
|
||||
return image;
|
||||
}
|
||||
|
||||
return [[UIImage alloc] initWithCGImage:[image CGImage] scale:scale orientation:image.imageOrientation];
|
||||
}
|
||||
|
||||
static UIImage * AFInflatedImageFromResponseWithDataAtScale(NSHTTPURLResponse *response, NSData *data, CGFloat scale) {
|
||||
if (!data || [data length] == 0) {
|
||||
return nil;
|
||||
}
|
||||
|
||||
CGImageRef imageRef = NULL;
|
||||
CGDataProviderRef dataProvider = CGDataProviderCreateWithCFData((__bridge CFDataRef)data);
|
||||
|
||||
if ([response.MIMEType isEqualToString:@"image/png"]) {
|
||||
imageRef = CGImageCreateWithPNGDataProvider(dataProvider, NULL, true, kCGRenderingIntentDefault);
|
||||
} else if ([response.MIMEType isEqualToString:@"image/jpeg"]) {
|
||||
imageRef = CGImageCreateWithJPEGDataProvider(dataProvider, NULL, true, kCGRenderingIntentDefault);
|
||||
|
||||
if (imageRef) {
|
||||
CGColorSpaceRef imageColorSpace = CGImageGetColorSpace(imageRef);
|
||||
CGColorSpaceModel imageColorSpaceModel = CGColorSpaceGetModel(imageColorSpace);
|
||||
|
||||
// CGImageCreateWithJPEGDataProvider does not properly handle CMKY, so fall back to AFImageWithDataAtScale
|
||||
if (imageColorSpaceModel == kCGColorSpaceModelCMYK) {
|
||||
CGImageRelease(imageRef);
|
||||
imageRef = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CGDataProviderRelease(dataProvider);
|
||||
|
||||
UIImage *image = AFImageWithDataAtScale(data, scale);
|
||||
if (!imageRef) {
|
||||
if (image.images || !image) {
|
||||
return image;
|
||||
}
|
||||
|
||||
imageRef = CGImageCreateCopy([image CGImage]);
|
||||
if (!imageRef) {
|
||||
return nil;
|
||||
}
|
||||
}
|
||||
|
||||
size_t width = CGImageGetWidth(imageRef);
|
||||
size_t height = CGImageGetHeight(imageRef);
|
||||
size_t bitsPerComponent = CGImageGetBitsPerComponent(imageRef);
|
||||
|
||||
if (width * height > 1024 * 1024 || bitsPerComponent > 8) {
|
||||
CGImageRelease(imageRef);
|
||||
|
||||
return image;
|
||||
}
|
||||
|
||||
// CGImageGetBytesPerRow() calculates incorrectly in iOS 5.0, so defer to CGBitmapContextCreate
|
||||
size_t bytesPerRow = 0;
|
||||
CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
|
||||
CGColorSpaceModel colorSpaceModel = CGColorSpaceGetModel(colorSpace);
|
||||
CGBitmapInfo bitmapInfo = CGImageGetBitmapInfo(imageRef);
|
||||
|
||||
if (colorSpaceModel == kCGColorSpaceModelRGB) {
|
||||
uint32_t alpha = (bitmapInfo & kCGBitmapAlphaInfoMask);
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wassign-enum"
|
||||
if (alpha == kCGImageAlphaNone) {
|
||||
bitmapInfo &= ~kCGBitmapAlphaInfoMask;
|
||||
bitmapInfo |= kCGImageAlphaNoneSkipFirst;
|
||||
} else if (!(alpha == kCGImageAlphaNoneSkipFirst || alpha == kCGImageAlphaNoneSkipLast)) {
|
||||
bitmapInfo &= ~kCGBitmapAlphaInfoMask;
|
||||
bitmapInfo |= kCGImageAlphaPremultipliedFirst;
|
||||
}
|
||||
#pragma clang diagnostic pop
|
||||
}
|
||||
|
||||
CGContextRef context = CGBitmapContextCreate(NULL, width, height, bitsPerComponent, bytesPerRow, colorSpace, bitmapInfo);
|
||||
|
||||
CGColorSpaceRelease(colorSpace);
|
||||
|
||||
if (!context) {
|
||||
CGImageRelease(imageRef);
|
||||
|
||||
return image;
|
||||
}
|
||||
|
||||
CGContextDrawImage(context, CGRectMake(0.0f, 0.0f, width, height), imageRef);
|
||||
CGImageRef inflatedImageRef = CGBitmapContextCreateImage(context);
|
||||
|
||||
CGContextRelease(context);
|
||||
|
||||
UIImage *inflatedImage = [[UIImage alloc] initWithCGImage:inflatedImageRef scale:scale orientation:image.imageOrientation];
|
||||
|
||||
CGImageRelease(inflatedImageRef);
|
||||
CGImageRelease(imageRef);
|
||||
|
||||
return inflatedImage;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@implementation AFImageResponseSerializer
|
||||
|
||||
- (instancetype)init {
|
||||
self = [super init];
|
||||
if (!self) {
|
||||
return nil;
|
||||
}
|
||||
|
||||
self.acceptableContentTypes = [[NSSet alloc] initWithObjects:@"image/tiff", @"image/jpeg", @"image/gif", @"image/png", @"image/ico", @"image/x-icon", @"image/bmp", @"image/x-bmp", @"image/x-xbitmap", @"image/x-win-bitmap", nil];
|
||||
|
||||
#if TARGET_OS_IOS || TARGET_OS_TV
|
||||
self.imageScale = [[UIScreen mainScreen] scale];
|
||||
self.automaticallyInflatesResponseImage = YES;
|
||||
#elif TARGET_OS_WATCH
|
||||
self.imageScale = [[WKInterfaceDevice currentDevice] screenScale];
|
||||
self.automaticallyInflatesResponseImage = YES;
|
||||
#endif
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
#pragma mark - AFURLResponseSerializer
|
||||
|
||||
- (id)responseObjectForResponse:(NSURLResponse *)response
|
||||
data:(NSData *)data
|
||||
error:(NSError *__autoreleasing *)error
|
||||
{
|
||||
if (![self validateResponse:(NSHTTPURLResponse *)response data:data error:error]) {
|
||||
if (!error || AFErrorOrUnderlyingErrorHasCodeInDomain(*error, NSURLErrorCannotDecodeContentData, AFURLResponseSerializationErrorDomain)) {
|
||||
return nil;
|
||||
}
|
||||
}
|
||||
|
||||
#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_WATCH
|
||||
if (self.automaticallyInflatesResponseImage) {
|
||||
return AFInflatedImageFromResponseWithDataAtScale((NSHTTPURLResponse *)response, data, self.imageScale);
|
||||
} else {
|
||||
return AFImageWithDataAtScale(data, self.imageScale);
|
||||
}
|
||||
#else
|
||||
// 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
|
||||
|
||||
- (instancetype)initWithCoder:(NSCoder *)decoder {
|
||||
self = [super initWithCoder:decoder];
|
||||
if (!self) {
|
||||
return nil;
|
||||
}
|
||||
|
||||
#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_WATCH
|
||||
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 TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_WATCH
|
||||
[coder encodeObject:@(self.imageScale) forKey:NSStringFromSelector(@selector(imageScale))];
|
||||
[coder encodeBool:self.automaticallyInflatesResponseImage forKey:NSStringFromSelector(@selector(automaticallyInflatesResponseImage))];
|
||||
#endif
|
||||
}
|
||||
|
||||
#pragma mark - NSCopying
|
||||
|
||||
- (instancetype)copyWithZone:(NSZone *)zone {
|
||||
AFImageResponseSerializer *serializer = [[[self class] allocWithZone:zone] init];
|
||||
|
||||
#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_WATCH
|
||||
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 <AFURLResponseSerialization> 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
|
||||
|
||||
- (instancetype)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
|
||||
|
||||
- (instancetype)copyWithZone:(NSZone *)zone {
|
||||
AFCompoundResponseSerializer *serializer = [[[self class] allocWithZone:zone] init];
|
||||
serializer.responseSerializers = self.responseSerializers;
|
||||
|
||||
return serializer;
|
||||
}
|
||||
|
||||
@end
|
500
Pods/AFNetworking/AFNetworking/AFURLSessionManager.h
generated
500
Pods/AFNetworking/AFNetworking/AFURLSessionManager.h
generated
@ -1,500 +0,0 @@
|
||||
// AFURLSessionManager.h
|
||||
// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import "AFURLResponseSerialization.h"
|
||||
#import "AFURLRequestSerialization.h"
|
||||
#import "AFSecurityPolicy.h"
|
||||
#if !TARGET_OS_WATCH
|
||||
#import "AFNetworkReachabilityManager.h"
|
||||
#endif
|
||||
|
||||
/**
|
||||
`AFURLSessionManager` creates and manages an `NSURLSession` object based on a specified `NSURLSessionConfiguration` object, which conforms to `<NSURLSessionTaskDelegate>`, `<NSURLSessionDataDelegate>`, `<NSURLSessionDownloadDelegate>`, and `<NSURLSessionDelegate>`.
|
||||
|
||||
## 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:needNewBodyStream:`
|
||||
- `URLSession:task:didCompleteWithError:`
|
||||
|
||||
### `NSURLSessionDataDelegate`
|
||||
|
||||
- `URLSession:dataTask:didReceiveResponse:completionHandler:`
|
||||
- `URLSession:dataTask:didBecomeDownloadTask:`
|
||||
- `URLSession:dataTask:didReceiveData:`
|
||||
- `URLSession:dataTask:willCacheResponse:completionHandler:`
|
||||
|
||||
### `NSURLSessionDownloadDelegate`
|
||||
|
||||
- `URLSession:downloadTask:didFinishDownloadingToURL:`
|
||||
- `URLSession:downloadTask:didWriteData:totalBytesWritten:totalBytesWritten:totalBytesExpectedToWrite:`
|
||||
- `URLSession:downloadTask:didResumeAtOffset:expectedTotalBytes:`
|
||||
|
||||
If any of these methods are overridden in a subclass, they _must_ call the `super` implementation first.
|
||||
|
||||
## Network Reachability Monitoring
|
||||
|
||||
Network reachability status and change monitoring is available through the `reachabilityManager` property. Applications may choose to monitor network reachability conditions in order to prevent or suspend any outbound requests. See `AFNetworkReachabilityManager` for more details.
|
||||
|
||||
## NSCoding Caveats
|
||||
|
||||
- Encoded managers do not include any block properties. Be sure to set delegate callback blocks when using `-initWithCoder:` or `NSKeyedUnarchiver`.
|
||||
|
||||
## NSCopying Caveats
|
||||
|
||||
- `-copy` and `-copyWithZone:` return a new manager with a new `NSURLSession` created from the configuration of the original.
|
||||
- Operation copies do not include any delegate callback blocks, as they often strongly captures a reference to `self`, which would otherwise have the unintuitive side-effect of pointing to the _original_ session manager when copied.
|
||||
|
||||
@warning Managers for background sessions must be owned for the duration of their use. This can be accomplished by creating an application-wide or shared singleton instance.
|
||||
*/
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface AFURLSessionManager : NSObject <NSURLSessionDelegate, NSURLSessionTaskDelegate, NSURLSessionDataDelegate, NSURLSessionDownloadDelegate, NSSecureCoding, NSCopying>
|
||||
|
||||
/**
|
||||
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 <AFURLResponseSerialization> responseSerializer;
|
||||
|
||||
///-------------------------------
|
||||
/// @name Managing Security Policy
|
||||
///-------------------------------
|
||||
|
||||
/**
|
||||
The security policy used by created session to evaluate server trust for secure connections. `AFURLSessionManager` uses the `defaultPolicy` unless otherwise specified.
|
||||
*/
|
||||
@property (nonatomic, strong) AFSecurityPolicy *securityPolicy;
|
||||
|
||||
#if !TARGET_OS_WATCH
|
||||
///--------------------------------------
|
||||
/// @name Monitoring Network Reachability
|
||||
///--------------------------------------
|
||||
|
||||
/**
|
||||
The network reachability manager. `AFURLSessionManager` uses the `sharedManager` by default.
|
||||
*/
|
||||
@property (readwrite, nonatomic, strong) AFNetworkReachabilityManager *reachabilityManager;
|
||||
#endif
|
||||
|
||||
///----------------------------
|
||||
/// @name Getting Session Tasks
|
||||
///----------------------------
|
||||
|
||||
/**
|
||||
The data, upload, and download tasks currently run by the managed session.
|
||||
*/
|
||||
@property (readonly, nonatomic, strong) NSArray <NSURLSessionTask *> *tasks;
|
||||
|
||||
/**
|
||||
The data tasks currently run by the managed session.
|
||||
*/
|
||||
@property (readonly, nonatomic, strong) NSArray <NSURLSessionDataTask *> *dataTasks;
|
||||
|
||||
/**
|
||||
The upload tasks currently run by the managed session.
|
||||
*/
|
||||
@property (readonly, nonatomic, strong) NSArray <NSURLSessionUploadTask *> *uploadTasks;
|
||||
|
||||
/**
|
||||
The download tasks currently run by the managed session.
|
||||
*/
|
||||
@property (readonly, nonatomic, strong) NSArray <NSURLSessionDownloadTask *> *downloadTasks;
|
||||
|
||||
///-------------------------------
|
||||
/// @name Managing Callback Queues
|
||||
///-------------------------------
|
||||
|
||||
/**
|
||||
The dispatch queue for `completionBlock`. If `NULL` (default), the main queue is used.
|
||||
*/
|
||||
@property (nonatomic, strong, nullable) dispatch_queue_t completionQueue;
|
||||
|
||||
/**
|
||||
The dispatch group for `completionBlock`. If `NULL` (default), a private dispatch group is used.
|
||||
*/
|
||||
@property (nonatomic, strong, nullable) 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:(nullable NSURLSessionConfiguration *)configuration NS_DESIGNATED_INITIALIZER;
|
||||
|
||||
/**
|
||||
Invalidates the managed session, optionally canceling pending tasks.
|
||||
|
||||
@param cancelPendingTasks Whether or not to cancel pending tasks.
|
||||
*/
|
||||
- (void)invalidateSessionCancelingTasks:(BOOL)cancelPendingTasks;
|
||||
|
||||
///-------------------------
|
||||
/// @name Running Data Tasks
|
||||
///-------------------------
|
||||
|
||||
/**
|
||||
Creates an `NSURLSessionDataTask` with the specified request.
|
||||
|
||||
@param request The HTTP request for the request.
|
||||
@param completionHandler A block object to be executed when the task finishes. This block has no return value and takes three arguments: the server response, the response object created by that serializer, and the error that occurred, if any.
|
||||
*/
|
||||
- (NSURLSessionDataTask *)dataTaskWithRequest:(NSURLRequest *)request
|
||||
completionHandler:(nullable void (^)(NSURLResponse *response, id _Nullable responseObject, NSError * _Nullable error))completionHandler;
|
||||
|
||||
/**
|
||||
Creates an `NSURLSessionDataTask` with the specified request.
|
||||
|
||||
@param request The HTTP request for the request.
|
||||
@param uploadProgressBlock A block object to be executed when the upload progress is updated. Note this block is called on the session queue, not the main queue.
|
||||
@param downloadProgressBlock A block object to be executed when the download progress is updated. Note this block is called on the session queue, not the main queue.
|
||||
@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
|
||||
uploadProgress:(nullable void (^)(NSProgress *uploadProgress))uploadProgressBlock
|
||||
downloadProgress:(nullable void (^)(NSProgress *downloadProgress))downloadProgressBlock
|
||||
completionHandler:(nullable void (^)(NSURLResponse *response, id _Nullable responseObject, NSError * _Nullable 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 uploadProgressBlock A block object to be executed when the upload progress is updated. Note this block is called on the session queue, not the main queue.
|
||||
@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:(nullable void (^)(NSProgress *uploadProgress))uploadProgressBlock
|
||||
completionHandler:(nullable void (^)(NSURLResponse *response, id _Nullable responseObject, NSError * _Nullable 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 uploadProgressBlock A block object to be executed when the upload progress is updated. Note this block is called on the session queue, not the main queue.
|
||||
@param completionHandler A block object to be executed when the task finishes. This block has no return value and takes three arguments: the server response, the response object created by that serializer, and the error that occurred, if any.
|
||||
*/
|
||||
- (NSURLSessionUploadTask *)uploadTaskWithRequest:(NSURLRequest *)request
|
||||
fromData:(nullable NSData *)bodyData
|
||||
progress:(nullable void (^)(NSProgress *uploadProgress))uploadProgressBlock
|
||||
completionHandler:(nullable void (^)(NSURLResponse *response, id _Nullable responseObject, NSError * _Nullable error))completionHandler;
|
||||
|
||||
/**
|
||||
Creates an `NSURLSessionUploadTask` with the specified streaming request.
|
||||
|
||||
@param request The HTTP request for the request.
|
||||
@param uploadProgressBlock A block object to be executed when the upload progress is updated. Note this block is called on the session queue, not the main queue.
|
||||
@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:(nullable void (^)(NSProgress *uploadProgress))uploadProgressBlock
|
||||
completionHandler:(nullable void (^)(NSURLResponse *response, id _Nullable responseObject, NSError * _Nullable error))completionHandler;
|
||||
|
||||
///-----------------------------
|
||||
/// @name Running Download Tasks
|
||||
///-----------------------------
|
||||
|
||||
/**
|
||||
Creates an `NSURLSessionDownloadTask` with the specified request.
|
||||
|
||||
@param request The HTTP request for the request.
|
||||
@param downloadProgressBlock A block object to be executed when the download progress is updated. Note this block is called on the session queue, not the main queue.
|
||||
@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:(nullable void (^)(NSProgress *downloadProgress))downloadProgressBlock
|
||||
destination:(nullable NSURL * (^)(NSURL *targetPath, NSURLResponse *response))destination
|
||||
completionHandler:(nullable void (^)(NSURLResponse *response, NSURL * _Nullable filePath, NSError * _Nullable error))completionHandler;
|
||||
|
||||
/**
|
||||
Creates an `NSURLSessionDownloadTask` with the specified resume data.
|
||||
|
||||
@param resumeData The data used to resume downloading.
|
||||
@param downloadProgressBlock A block object to be executed when the download progress is updated. Note this block is called on the session queue, not the main queue.
|
||||
@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:(nullable void (^)(NSProgress *downloadProgress))downloadProgressBlock
|
||||
destination:(nullable NSURL * (^)(NSURL *targetPath, NSURLResponse *response))destination
|
||||
completionHandler:(nullable void (^)(NSURLResponse *response, NSURL * _Nullable filePath, NSError * _Nullable error))completionHandler;
|
||||
|
||||
///---------------------------------
|
||||
/// @name Getting Progress for Tasks
|
||||
///---------------------------------
|
||||
|
||||
/**
|
||||
Returns the upload progress of the specified task.
|
||||
|
||||
@param task The session task. Must not be `nil`.
|
||||
|
||||
@return An `NSProgress` object reporting the upload progress of a task, or `nil` if the progress is unavailable.
|
||||
*/
|
||||
- (nullable NSProgress *)uploadProgressForTask:(NSURLSessionTask *)task;
|
||||
|
||||
/**
|
||||
Returns the download progress of the specified task.
|
||||
|
||||
@param task The session task. Must not be `nil`.
|
||||
|
||||
@return An `NSProgress` object reporting the download progress of a task, or `nil` if the progress is unavailable.
|
||||
*/
|
||||
- (nullable NSProgress *)downloadProgressForTask:(NSURLSessionTask *)task;
|
||||
|
||||
///-----------------------------------------
|
||||
/// @name Setting Session Delegate Callbacks
|
||||
///-----------------------------------------
|
||||
|
||||
/**
|
||||
Sets a block to be executed when the managed session becomes invalid, as handled by the `NSURLSessionDelegate` method `URLSession:didBecomeInvalidWithError:`.
|
||||
|
||||
@param block A block object to be executed when the managed session becomes invalid. The block has no return value, and takes two arguments: the session, and the error related to the cause of invalidation.
|
||||
*/
|
||||
- (void)setSessionDidBecomeInvalidBlock:(nullable void (^)(NSURLSession *session, NSError *error))block;
|
||||
|
||||
/**
|
||||
Sets a block to be executed when a connection level authentication challenge has occurred, as handled by the `NSURLSessionDelegate` method `URLSession:didReceiveChallenge:completionHandler:`.
|
||||
|
||||
@param block A block object to be executed when a connection level authentication challenge has occurred. The block returns the disposition of the authentication challenge, and takes three arguments: the session, the authentication challenge, and a pointer to the credential that should be used to resolve the challenge.
|
||||
*/
|
||||
- (void)setSessionDidReceiveAuthenticationChallengeBlock:(nullable NSURLSessionAuthChallengeDisposition (^)(NSURLSession *session, NSURLAuthenticationChallenge *challenge, NSURLCredential * _Nullable __autoreleasing * _Nullable credential))block;
|
||||
|
||||
///--------------------------------------
|
||||
/// @name Setting Task Delegate Callbacks
|
||||
///--------------------------------------
|
||||
|
||||
/**
|
||||
Sets a block to be executed when a task requires a new request body stream to send to the remote server, as handled by the `NSURLSessionTaskDelegate` method `URLSession:task:needNewBodyStream:`.
|
||||
|
||||
@param block A block object to be executed when a task requires a new request body stream.
|
||||
*/
|
||||
- (void)setTaskNeedNewBodyStreamBlock:(nullable NSInputStream * (^)(NSURLSession *session, NSURLSessionTask *task))block;
|
||||
|
||||
/**
|
||||
Sets a block to be executed when an HTTP request is attempting to perform a redirection to a different URL, as handled by the `NSURLSessionTaskDelegate` method `URLSession:willPerformHTTPRedirection:newRequest:completionHandler:`.
|
||||
|
||||
@param block A block object to be executed when an HTTP request is attempting to perform a redirection to a different URL. The block returns the request to be made for the redirection, and takes four arguments: the session, the task, the redirection response, and the request corresponding to the redirection response.
|
||||
*/
|
||||
- (void)setTaskWillPerformHTTPRedirectionBlock:(nullable NSURLRequest * (^)(NSURLSession *session, NSURLSessionTask *task, NSURLResponse *response, NSURLRequest *request))block;
|
||||
|
||||
/**
|
||||
Sets a block to be executed when a session task has received a request specific authentication challenge, as handled by the `NSURLSessionTaskDelegate` method `URLSession:task:didReceiveChallenge:completionHandler:`.
|
||||
|
||||
@param block A block object to be executed when a session task has received a request specific authentication challenge. The block returns the disposition of the authentication challenge, and takes four arguments: the session, the task, the authentication challenge, and a pointer to the credential that should be used to resolve the challenge.
|
||||
*/
|
||||
- (void)setTaskDidReceiveAuthenticationChallengeBlock:(nullable NSURLSessionAuthChallengeDisposition (^)(NSURLSession *session, NSURLSessionTask *task, NSURLAuthenticationChallenge *challenge, NSURLCredential * _Nullable __autoreleasing * _Nullable credential))block;
|
||||
|
||||
/**
|
||||
Sets a block to be executed periodically to track upload progress, as handled by the `NSURLSessionTaskDelegate` method `URLSession:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:`.
|
||||
|
||||
@param block A block object to be called when an undetermined number of bytes have been uploaded to the server. This block has no return value and takes five arguments: the session, the task, the number of bytes written since the last time the upload progress block was called, the total bytes written, and the total bytes expected to be written during the request, as initially determined by the length of the HTTP body. This block may be called multiple times, and will execute on the main thread.
|
||||
*/
|
||||
- (void)setTaskDidSendBodyDataBlock:(nullable void (^)(NSURLSession *session, NSURLSessionTask *task, int64_t bytesSent, int64_t totalBytesSent, int64_t totalBytesExpectedToSend))block;
|
||||
|
||||
/**
|
||||
Sets a block to be executed as the last message related to a specific task, as handled by the `NSURLSessionTaskDelegate` method `URLSession:task:didCompleteWithError:`.
|
||||
|
||||
@param block A block object to be executed when a session task is completed. The block has no return value, and takes three arguments: the session, the task, and any error that occurred in the process of executing the task.
|
||||
*/
|
||||
- (void)setTaskDidCompleteBlock:(nullable void (^)(NSURLSession *session, NSURLSessionTask *task, NSError * _Nullable error))block;
|
||||
|
||||
///-------------------------------------------
|
||||
/// @name Setting Data Task Delegate Callbacks
|
||||
///-------------------------------------------
|
||||
|
||||
/**
|
||||
Sets a block to be executed when a data task has received a response, as handled by the `NSURLSessionDataDelegate` method `URLSession:dataTask:didReceiveResponse:completionHandler:`.
|
||||
|
||||
@param block A block object to be executed when a data task has received a response. The block returns the disposition of the session response, and takes three arguments: the session, the data task, and the received response.
|
||||
*/
|
||||
- (void)setDataTaskDidReceiveResponseBlock:(nullable NSURLSessionResponseDisposition (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSURLResponse *response))block;
|
||||
|
||||
/**
|
||||
Sets a block to be executed when a data task has become a download task, as handled by the `NSURLSessionDataDelegate` method `URLSession:dataTask:didBecomeDownloadTask:`.
|
||||
|
||||
@param block A block object to be executed when a data task has become a download task. The block has no return value, and takes three arguments: the session, the data task, and the download task it has become.
|
||||
*/
|
||||
- (void)setDataTaskDidBecomeDownloadTaskBlock:(nullable void (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSURLSessionDownloadTask *downloadTask))block;
|
||||
|
||||
/**
|
||||
Sets a block to be executed when a data task receives data, as handled by the `NSURLSessionDataDelegate` method `URLSession:dataTask:didReceiveData:`.
|
||||
|
||||
@param block A block object to be called when an undetermined number of bytes have been downloaded from the server. This block has no return value and takes three arguments: the session, the data task, and the data received. This block may be called multiple times, and will execute on the session manager operation queue.
|
||||
*/
|
||||
- (void)setDataTaskDidReceiveDataBlock:(nullable void (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSData *data))block;
|
||||
|
||||
/**
|
||||
Sets a block to be executed to determine the caching behavior of a data task, as handled by the `NSURLSessionDataDelegate` method `URLSession:dataTask:willCacheResponse:completionHandler:`.
|
||||
|
||||
@param block A block object to be executed to determine the caching behavior of a data task. The block returns the response to cache, and takes three arguments: the session, the data task, and the proposed cached URL response.
|
||||
*/
|
||||
- (void)setDataTaskWillCacheResponseBlock:(nullable NSCachedURLResponse * (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSCachedURLResponse *proposedResponse))block;
|
||||
|
||||
/**
|
||||
Sets a block to be executed once all messages enqueued for a session have been delivered, as handled by the `NSURLSessionDataDelegate` method `URLSessionDidFinishEventsForBackgroundURLSession:`.
|
||||
|
||||
@param block A block object to be executed once all messages enqueued for a session have been delivered. The block has no return value and takes a single argument: the session.
|
||||
*/
|
||||
- (void)setDidFinishEventsForBackgroundURLSessionBlock:(nullable void (^)(NSURLSession *session))block;
|
||||
|
||||
///-----------------------------------------------
|
||||
/// @name Setting Download Task Delegate Callbacks
|
||||
///-----------------------------------------------
|
||||
|
||||
/**
|
||||
Sets a block to be executed when a download task has completed a download, as handled by the `NSURLSessionDownloadDelegate` method `URLSession:downloadTask:didFinishDownloadingToURL:`.
|
||||
|
||||
@param block A block object to be executed when a download task has completed. The block returns the URL the download should be moved to, and takes three arguments: the session, the download task, and the temporary location of the downloaded file. If the file manager encounters an error while attempting to move the temporary file to the destination, an `AFURLSessionDownloadTaskDidFailToMoveFileNotification` will be posted, with the download task as its object, and the user info of the error.
|
||||
*/
|
||||
- (void)setDownloadTaskDidFinishDownloadingBlock:(nullable NSURL * _Nullable (^)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, NSURL *location))block;
|
||||
|
||||
/**
|
||||
Sets a block to be executed periodically to track download progress, as handled by the `NSURLSessionDownloadDelegate` method `URLSession:downloadTask:didWriteData:totalBytesWritten:totalBytesWritten:totalBytesExpectedToWrite:`.
|
||||
|
||||
@param block A block object to be called when an undetermined number of bytes have been downloaded from the server. This block has no return value and takes five arguments: the session, the download task, the number of bytes read since the last time the download progress block was called, the total bytes read, and the total bytes expected to be read during the request, as initially determined by the expected content size of the `NSHTTPURLResponse` object. This block may be called multiple times, and will execute on the session manager operation queue.
|
||||
*/
|
||||
- (void)setDownloadTaskDidWriteDataBlock:(nullable void (^)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, int64_t bytesWritten, int64_t totalBytesWritten, int64_t totalBytesExpectedToWrite))block;
|
||||
|
||||
/**
|
||||
Sets a block to be executed when a download task has been resumed, as handled by the `NSURLSessionDownloadDelegate` method `URLSession:downloadTask:didResumeAtOffset:expectedTotalBytes:`.
|
||||
|
||||
@param block A block object to be executed when a download task has been resumed. The block has no return value and takes four arguments: the session, the download task, the file offset of the resumed download, and the total number of bytes expected to be downloaded.
|
||||
*/
|
||||
- (void)setDownloadTaskDidResumeBlock:(nullable void (^)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, int64_t fileOffset, int64_t expectedTotalBytes))block;
|
||||
|
||||
@end
|
||||
|
||||
///--------------------
|
||||
/// @name Notifications
|
||||
///--------------------
|
||||
|
||||
/**
|
||||
Posted when a task resumes.
|
||||
*/
|
||||
FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidResumeNotification;
|
||||
|
||||
/**
|
||||
Posted when a task finishes executing. Includes a userInfo dictionary with additional information about the task.
|
||||
*/
|
||||
FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidCompleteNotification;
|
||||
|
||||
/**
|
||||
Posted when a task suspends its execution.
|
||||
*/
|
||||
FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidSuspendNotification;
|
||||
|
||||
/**
|
||||
Posted when a session is invalidated.
|
||||
*/
|
||||
FOUNDATION_EXPORT NSString * const AFURLSessionDidInvalidateNotification;
|
||||
|
||||
/**
|
||||
Posted when a session download task encountered an error when moving the temporary download file to a specified destination.
|
||||
*/
|
||||
FOUNDATION_EXPORT NSString * const AFURLSessionDownloadTaskDidFailToMoveFileNotification;
|
||||
|
||||
/**
|
||||
The raw response data of the task. Included in the userInfo dictionary of the `AFNetworkingTaskDidCompleteNotification` if response data exists for the task.
|
||||
*/
|
||||
FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidCompleteResponseDataKey;
|
||||
|
||||
/**
|
||||
The serialized response object of the task. Included in the userInfo dictionary of the `AFNetworkingTaskDidCompleteNotification` if the response was serialized.
|
||||
*/
|
||||
FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidCompleteSerializedResponseKey;
|
||||
|
||||
/**
|
||||
The response serializer used to serialize the response. Included in the userInfo dictionary of the `AFNetworkingTaskDidCompleteNotification` if the task has an associated response serializer.
|
||||
*/
|
||||
FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidCompleteResponseSerializerKey;
|
||||
|
||||
/**
|
||||
The file path associated with the download task. Included in the userInfo dictionary of the `AFNetworkingTaskDidCompleteNotification` if an the response data has been stored directly to disk.
|
||||
*/
|
||||
FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidCompleteAssetPathKey;
|
||||
|
||||
/**
|
||||
Any error associated with the task, or the serialization of the response. Included in the userInfo dictionary of the `AFNetworkingTaskDidCompleteNotification` if an error exists.
|
||||
*/
|
||||
FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidCompleteErrorKey;
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
1244
Pods/AFNetworking/AFNetworking/AFURLSessionManager.m
generated
1244
Pods/AFNetworking/AFNetworking/AFURLSessionManager.m
generated
File diff suppressed because it is too large
Load Diff
19
Pods/AFNetworking/LICENSE
generated
19
Pods/AFNetworking/LICENSE
generated
@ -1,19 +0,0 @@
|
||||
Copyright (c) 2011–2016 Alamofire Software Foundation (http://alamofire.org/)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
320
Pods/AFNetworking/README.md
generated
320
Pods/AFNetworking/README.md
generated
@ -1,320 +0,0 @@
|
||||
<p align="center" >
|
||||
<img src="https://raw.github.com/AFNetworking/AFNetworking/assets/afnetworking-logo.png" alt="AFNetworking" title="AFNetworking">
|
||||
</p>
|
||||
|
||||
[![Build Status](https://travis-ci.org/AFNetworking/AFNetworking.svg)](https://travis-ci.org/AFNetworking/AFNetworking)
|
||||
[![codecov.io](https://codecov.io/github/AFNetworking/AFNetworking/coverage.svg?branch=master)](https://codecov.io/github/AFNetworking/AFNetworking?branch=master)
|
||||
[![CocoaPods Compatible](https://img.shields.io/cocoapods/v/AFNetworking.svg)](https://img.shields.io/cocoapods/v/AFNetworking.svg)
|
||||
[![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
|
||||
[![Platform](https://img.shields.io/cocoapods/p/AFNetworking.svg?style=flat)](http://cocoadocs.org/docsets/AFNetworking)
|
||||
[![Twitter](https://img.shields.io/badge/twitter-@AFNetworking-blue.svg?style=flat)](http://twitter.com/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 3.0 Migration Guide](https://github.com/AFNetworking/AFNetworking/wiki/AFNetworking-3.0-Migration-Guide) for an overview of the architectural changes from 2.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
|
||||
AFNetworking supports multiple methods for installing the library in a project.
|
||||
|
||||
## 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). You can install it with the following command:
|
||||
|
||||
```bash
|
||||
$ gem install cocoapods
|
||||
```
|
||||
|
||||
> CocoaPods 0.39.0+ is required to build AFNetworking 3.0.0+.
|
||||
|
||||
#### Podfile
|
||||
|
||||
To integrate AFNetworking into your Xcode project using CocoaPods, specify it in your `Podfile`:
|
||||
|
||||
```ruby
|
||||
source 'https://github.com/CocoaPods/Specs.git'
|
||||
platform :ios, '8.0'
|
||||
|
||||
pod 'AFNetworking', '~> 3.0'
|
||||
```
|
||||
|
||||
Then, run the following command:
|
||||
|
||||
```bash
|
||||
$ pod install
|
||||
```
|
||||
|
||||
### Installation with Carthage
|
||||
|
||||
[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.
|
||||
|
||||
You can install Carthage with [Homebrew](http://brew.sh/) using the following command:
|
||||
|
||||
```bash
|
||||
$ brew update
|
||||
$ brew install carthage
|
||||
```
|
||||
|
||||
To integrate AFNetworking into your Xcode project using Carthage, specify it in your `Cartfile`:
|
||||
|
||||
```ogdl
|
||||
github "AFNetworking/AFNetworking" ~> 3.0
|
||||
```
|
||||
|
||||
Run `carthage` to build the framework and drag the built `AFNetworking.framework` into your Xcode project.
|
||||
|
||||
## Requirements
|
||||
|
||||
| AFNetworking Version | Minimum iOS Target | Minimum OS X Target | Minimum watchOS Target | Minimum tvOS Target | Notes |
|
||||
|:--------------------:|:---------------------------:|:----------------------------:|:----------------------------:|:----------------------------:|:-------------------------------------------------------------------------:|
|
||||
| 3.x | iOS 7 | OS X 10.9 | watchOS 2.0 | tvOS 9.0 | Xcode 7+ is required. `NSURLConnectionOperation` support has been removed. |
|
||||
| 2.6 -> 2.6.3 | iOS 7 | OS X 10.9 | watchOS 2.0 | n/a | Xcode 7+ is required. |
|
||||
| 2.0 -> 2.5.4 | iOS 6 | OS X 10.8 | n/a | n/a | Xcode 5+ is required. `NSURLSession` subspec requires iOS 7 or OS X 10.9. |
|
||||
| 1.x | iOS 5 | Mac OS X 10.7 | n/a | n/a |
|
||||
| 0.10.x | iOS 4 | Mac OS X 10.6 | n/a | n/a |
|
||||
|
||||
(OS X projects must support [64-bit with modern Cocoa runtime](https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtVersionsPlatforms.html)).
|
||||
|
||||
> Programming in Swift? Try [Alamofire](https://github.com/Alamofire/Alamofire) for a more conventional set of APIs.
|
||||
|
||||
## Architecture
|
||||
|
||||
### NSURLSession
|
||||
|
||||
- `AFURLSessionManager`
|
||||
- `AFHTTPSessionManager`
|
||||
|
||||
### Serialization
|
||||
|
||||
* `<AFURLRequestSerialization>`
|
||||
- `AFHTTPRequestSerializer`
|
||||
- `AFJSONRequestSerializer`
|
||||
- `AFPropertyListRequestSerializer`
|
||||
* `<AFURLResponseSerialization>`
|
||||
- `AFHTTPResponseSerializer`
|
||||
- `AFJSONResponseSerializer`
|
||||
- `AFXMLParserResponseSerializer`
|
||||
- `AFXMLDocumentResponseSerializer` _(Mac OS X)_
|
||||
- `AFPropertyListResponseSerializer`
|
||||
- `AFImageResponseSerializer`
|
||||
- `AFCompoundResponseSerializer`
|
||||
|
||||
### Additional Functionality
|
||||
|
||||
- `AFSecurityPolicy`
|
||||
- `AFNetworkReachabilityManager`
|
||||
|
||||
## Usage
|
||||
|
||||
### AFURLSessionManager
|
||||
|
||||
`AFURLSessionManager` creates and manages an `NSURLSession` object based on a specified `NSURLSessionConfiguration` object, which conforms to `<NSURLSessionTaskDelegate>`, `<NSURLSessionDataDelegate>`, `<NSURLSessionDownloadDelegate>`, and `<NSURLSessionDelegate>`.
|
||||
|
||||
#### 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<AFMultipartFormData> 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]];
|
||||
|
||||
NSURLSessionUploadTask *uploadTask;
|
||||
uploadTask = [manager
|
||||
uploadTaskWithStreamedRequest:request
|
||||
progress:^(NSProgress * _Nonnull uploadProgress) {
|
||||
// This is not called back on the main queue.
|
||||
// You are responsible for dispatching to the main queue for UI updates
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
//Update the progress view
|
||||
[progressView setProgress:uploadProgress.fractionCompleted];
|
||||
});
|
||||
}
|
||||
completionHandler:^(NSURLResponse * _Nonnull response, id _Nullable responseObject, NSError * _Nullable 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://httpbin.org/get"];
|
||||
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 error:nil];
|
||||
```
|
||||
|
||||
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 error:nil];
|
||||
```
|
||||
|
||||
POST http://example.com/
|
||||
Content-Type: application/json
|
||||
|
||||
{"foo": "bar", "baz": [1,2,3]}
|
||||
|
||||
---
|
||||
|
||||
### Network Reachability Manager
|
||||
|
||||
`AFNetworkReachabilityManager` monitors the reachability of domains, and addresses for both WWAN and WiFi network interfaces.
|
||||
|
||||
* Do not use Reachability to determine if the original request should be sent.
|
||||
* You should try to send it.
|
||||
* You can use Reachability to determine when a request should be automatically retried.
|
||||
* Although it may still fail, a Reachability notification that the connectivity is available is a good time to retry something.
|
||||
* Network reachability is a useful tool for determining why a request might have failed.
|
||||
* After a network request has failed, telling the user they're offline is better than giving them a more technical but accurate error, such as "request timed out."
|
||||
|
||||
See also [WWDC 2012 session 706, "Networking Best Practices."](https://developer.apple.com/videos/play/wwdc2012-706/).
|
||||
|
||||
#### Shared Network Reachability
|
||||
|
||||
```objective-c
|
||||
[[AFNetworkReachabilityManager sharedManager] setReachabilityStatusChangeBlock:^(AFNetworkReachabilityStatus status) {
|
||||
NSLog(@"Reachability: %@", AFStringFromNetworkReachabilityStatus(status));
|
||||
}];
|
||||
|
||||
[[AFNetworkReachabilityManager sharedManager] 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
|
||||
AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
|
||||
manager.securityPolicy.allowInvalidCertificates = YES; // not recommended for production
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Unit Tests
|
||||
|
||||
AFNetworking includes a suite of unit tests within the Tests subdirectory. These tests can be run simply be executed the test action on the platform framework you would like to test.
|
||||
|
||||
## Credits
|
||||
|
||||
AFNetworking is owned and maintained by the [Alamofire Software Foundation](http://alamofire.org).
|
||||
|
||||
AFNetworking was originally created by [Scott Raymond](https://github.com/sco/) and [Mattt Thompson](https://github.com/mattt/) in the development of [Gowalla for iPhone](http://en.wikipedia.org/wiki/Gowalla).
|
||||
|
||||
AFNetworking's logo was designed by [Alan Defibaugh](http://www.alandefibaugh.com/).
|
||||
|
||||
And most of all, thanks to AFNetworking's [growing list of contributors](https://github.com/AFNetworking/AFNetworking/contributors).
|
||||
|
||||
### Security Disclosure
|
||||
|
||||
If you believe you have identified a security vulnerability with AFNetworking, you should report it as soon as possible via email to security@alamofire.org. Please do not post it to a public issue tracker.
|
||||
|
||||
## License
|
||||
|
||||
AFNetworking is released under the MIT license. See LICENSE for details.
|
30
Pods/Manifest.lock
generated
30
Pods/Manifest.lock
generated
@ -1,30 +0,0 @@
|
||||
PODS:
|
||||
- AFNetworking (3.1.0):
|
||||
- AFNetworking/NSURLSession (= 3.1.0)
|
||||
- AFNetworking/Reachability (= 3.1.0)
|
||||
- AFNetworking/Security (= 3.1.0)
|
||||
- AFNetworking/Serialization (= 3.1.0)
|
||||
- AFNetworking/UIKit (= 3.1.0)
|
||||
- AFNetworking/NSURLSession (3.1.0):
|
||||
- AFNetworking/Reachability
|
||||
- AFNetworking/Security
|
||||
- AFNetworking/Serialization
|
||||
- AFNetworking/Reachability (3.1.0)
|
||||
- AFNetworking/Security (3.1.0)
|
||||
- AFNetworking/Serialization (3.1.0)
|
||||
- Sparkle (1.17.0)
|
||||
- STPrivilegedTask (1.0.1)
|
||||
|
||||
DEPENDENCIES:
|
||||
- AFNetworking (~> 3.1)
|
||||
- Sparkle
|
||||
- STPrivilegedTask (~> 1.0)
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
AFNetworking: 5e0e199f73d8626b11e79750991f5d173d1f8b67
|
||||
Sparkle: ccfb47699feea7b40b51cf3176f69404e5b1da6c
|
||||
STPrivilegedTask: 103f97827454e786074640cf89d303be344498c7
|
||||
|
||||
PODFILE CHECKSUM: 38ea1d430e030c744f63f67b632bcc6998821eed
|
||||
|
||||
COCOAPODS: 1.1.1
|
851
Pods/Pods.xcodeproj/project.pbxproj
generated
851
Pods/Pods.xcodeproj/project.pbxproj
generated
@ -1,851 +0,0 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 46;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
03ADE51412DADB5E1B2D2DFA311AB858 /* AFSecurityPolicy.m in Sources */ = {isa = PBXBuildFile; fileRef = 50927E552E15F59C005128F4B70A2903 /* AFSecurityPolicy.m */; };
|
||||
075CEC6B154EFB77AC3AB9244194166B /* AFURLResponseSerialization.m in Sources */ = {isa = PBXBuildFile; fileRef = 748D3E75C2F48DC81FB5CB32E59B7F6A /* AFURLResponseSerialization.m */; };
|
||||
1273B3EAB642704E8C611DCFEC0DCDF4 /* AFHTTPSessionManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 360F0B7A1758A64A9D7764A41812FFE9 /* AFHTTPSessionManager.m */; };
|
||||
1A2D260D68A1F7E7F6F45B8C453335BA /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F7892C2662B8D3F62F8AF900BC74BFEC /* Security.framework */; };
|
||||
1BBB2ADFD6670A0B744D63931C73B989 /* STPrivilegedTask.h in Headers */ = {isa = PBXBuildFile; fileRef = 8D5378B0C668E5A62D5F0B3B78B2E6E9 /* STPrivilegedTask.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
1DCC0B01F14FD97F84908877ADD69C8D /* AFURLRequestSerialization.m in Sources */ = {isa = PBXBuildFile; fileRef = FD572838B8C688222B3955F28FF1B332 /* AFURLRequestSerialization.m */; };
|
||||
204E0CAC8785C3C23FC490126DB30ABD /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EBCC85399EA7E4FD8AADBA88B2CCB918 /* Cocoa.framework */; };
|
||||
2B260ABA06488D6B1C0C27FB5E440C33 /* AFURLResponseSerialization.h in Headers */ = {isa = PBXBuildFile; fileRef = 8EC096F1188BF92116D7C3EBA063FFAE /* AFURLResponseSerialization.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
37CF7097CCADBB46D440FF03D568D8DB /* AFNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = 0AFCE97C1EA53292C5564E889FC9904E /* AFNetworking.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
431DFB318A8CD33D6687DBA35E64F2D5 /* Pods-eqMac2-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = EA15F614598112000CD42FFB969923C8 /* Pods-eqMac2-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
7331F7D7B9C4F385A0658A682C3487D4 /* AFNetworkReachabilityManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 85956FD425203BF735FC3953DBAB02CF /* AFNetworkReachabilityManager.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
7AAB67FE20184F8327EF97DAB8A5413B /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 15E7226E387551A60AD8298074197731 /* CoreServices.framework */; };
|
||||
84CB94BA77148BFD07109B676D300BA0 /* STPrivilegedTask-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = C40B50CBF6BA80EE2004AA959D821D57 /* STPrivilegedTask-dummy.m */; };
|
||||
8548B3DE3031FEDA82A3EDC606D8BC07 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F7892C2662B8D3F62F8AF900BC74BFEC /* Security.framework */; };
|
||||
96C4828616AE0C7FFDD7B37B855B01C6 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EBCC85399EA7E4FD8AADBA88B2CCB918 /* Cocoa.framework */; };
|
||||
9AE62DBF57A62DD23D8C84EA072E54D7 /* STPrivilegedTask-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = DD4A1158067B9FDDE4C3D58D13C39A84 /* STPrivilegedTask-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
A550C24F30F53734F6587C397FA06370 /* Pods-eqMac2-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = E35F6A821F03C20D7776708F7F389B96 /* Pods-eqMac2-dummy.m */; };
|
||||
C23BE8D14A6CDEE6CC7D832F0DB7F844 /* AFNetworking-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 3228FFA395E3BAC2F8889F89459BFB93 /* AFNetworking-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
C75CFC70A4C40A704A802E767BE45BAF /* AFHTTPSessionManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 547748B9DE015ED854B4125406BC7ED4 /* AFHTTPSessionManager.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
C8B257232D03D40C8AD2C8146014A238 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EBCC85399EA7E4FD8AADBA88B2CCB918 /* Cocoa.framework */; };
|
||||
CAF143DA5A1D21860A5B52BE3D8EE72A /* STPrivilegedTask.m in Sources */ = {isa = PBXBuildFile; fileRef = 9AEEDAE52C838EE185B69A0CADA31447 /* STPrivilegedTask.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
|
||||
CD017CD539465D295172FC7F6188CD57 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1C9B4D017CBF32E657321A46935A4388 /* SystemConfiguration.framework */; };
|
||||
CFF537E91FEAA79997CC68B8380E7FC8 /* AFURLSessionManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F510865480CACBAA83D039AD31648BD /* AFURLSessionManager.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
D03FF20282808A13DF33D192D26A6B96 /* AFURLSessionManager.m in Sources */ = {isa = PBXBuildFile; fileRef = EB461E748A55FFA05AA583FEB9D5BF2B /* AFURLSessionManager.m */; };
|
||||
DD4B08CF945D4E33ED94EE0436F7E454 /* AFNetworkReachabilityManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 409FEE7877D3DE61497F7E20FA56B78D /* AFNetworkReachabilityManager.m */; };
|
||||
E624CA2A0A4CBAB333AEE996F6183CB3 /* AFSecurityPolicy.h in Headers */ = {isa = PBXBuildFile; fileRef = B78C9CF038C193C7DB5E375A34A4DF57 /* AFSecurityPolicy.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
F8BB578914183F0CAE4BB035154959C5 /* AFURLRequestSerialization.h in Headers */ = {isa = PBXBuildFile; fileRef = 2C55D83601E692E6582A29C56C658047 /* AFURLRequestSerialization.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
F926308C0EF84649F76B7CB998C5D16D /* AFNetworking-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 5C838592D39C0B2E67A05358E0406604 /* AFNetworking-dummy.m */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
0F857ADDFD8E2287B5701E3E1D423ACE /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = CF937694CA889245A8C5AF2883B27BB9;
|
||||
remoteInfo = AFNetworking;
|
||||
};
|
||||
5E0322D512CF6D0189A76B4100ED0920 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 70C8B777F8F142ABDED308DCC68355C0;
|
||||
remoteInfo = STPrivilegedTask;
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
038D3280C055AEAA7431F9EBADD47C0C /* Pods_eqMac2.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_eqMac2.framework; path = "Pods-eqMac2.framework"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
0AFCE97C1EA53292C5564E889FC9904E /* AFNetworking.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = AFNetworking.h; path = AFNetworking/AFNetworking.h; sourceTree = "<group>"; };
|
||||
0C441D26F57493C880046A78F5C73F84 /* AFNetworking.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = AFNetworking.xcconfig; sourceTree = "<group>"; };
|
||||
0E543380CDA914C8454BD181D305C58D /* Sparkle.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Sparkle.framework; sourceTree = "<group>"; };
|
||||
0F510865480CACBAA83D039AD31648BD /* AFURLSessionManager.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = AFURLSessionManager.h; path = AFNetworking/AFURLSessionManager.h; sourceTree = "<group>"; };
|
||||
15E7226E387551A60AD8298074197731 /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/CoreServices.framework; sourceTree = DEVELOPER_DIR; };
|
||||
1C9B4D017CBF32E657321A46935A4388 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SystemConfiguration.framework; sourceTree = DEVELOPER_DIR; };
|
||||
2C55D83601E692E6582A29C56C658047 /* AFURLRequestSerialization.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = AFURLRequestSerialization.h; path = AFNetworking/AFURLRequestSerialization.h; sourceTree = "<group>"; };
|
||||
2DFB384BD4E2B9EB8A688D54D42BD097 /* SUVersionDisplayProtocol.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = SUVersionDisplayProtocol.h; path = Sparkle.framework/Versions/A/Headers/SUVersionDisplayProtocol.h; sourceTree = "<group>"; };
|
||||
3228FFA395E3BAC2F8889F89459BFB93 /* AFNetworking-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "AFNetworking-umbrella.h"; sourceTree = "<group>"; };
|
||||
340BD4CB79CD93D9C1BF30D714F60E80 /* STPrivilegedTask-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "STPrivilegedTask-prefix.pch"; sourceTree = "<group>"; };
|
||||
360F0B7A1758A64A9D7764A41812FFE9 /* AFHTTPSessionManager.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = AFHTTPSessionManager.m; path = AFNetworking/AFHTTPSessionManager.m; sourceTree = "<group>"; };
|
||||
409FEE7877D3DE61497F7E20FA56B78D /* AFNetworkReachabilityManager.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = AFNetworkReachabilityManager.m; path = AFNetworking/AFNetworkReachabilityManager.m; sourceTree = "<group>"; };
|
||||
426C509E7F1C282ED9C3301F93490738 /* Pods-eqMac2.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-eqMac2.release.xcconfig"; sourceTree = "<group>"; };
|
||||
50927E552E15F59C005128F4B70A2903 /* AFSecurityPolicy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = AFSecurityPolicy.m; path = AFNetworking/AFSecurityPolicy.m; sourceTree = "<group>"; };
|
||||
547748B9DE015ED854B4125406BC7ED4 /* AFHTTPSessionManager.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = AFHTTPSessionManager.h; path = AFNetworking/AFHTTPSessionManager.h; sourceTree = "<group>"; };
|
||||
55CDFDCAE31CEF7E278251969C55261C /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
57C0DA8D4FD708C9C6C1666C2E183C27 /* SUUpdater.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = SUUpdater.h; path = Sparkle.framework/Versions/A/Headers/SUUpdater.h; sourceTree = "<group>"; };
|
||||
5BE97DA81C123696A2E0AFB9998CB9AC /* Sparkle.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Sparkle.h; path = Sparkle.framework/Versions/A/Headers/Sparkle.h; sourceTree = "<group>"; };
|
||||
5C838592D39C0B2E67A05358E0406604 /* AFNetworking-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "AFNetworking-dummy.m"; sourceTree = "<group>"; };
|
||||
620F1AC2CB5C9AEC0AC0AD9566B8670B /* Pods-eqMac2-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-eqMac2-resources.sh"; sourceTree = "<group>"; };
|
||||
6B565B1332AB54FD3EE033038D9BAEBA /* Pods-eqMac2.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Pods-eqMac2.modulemap"; sourceTree = "<group>"; };
|
||||
748D3E75C2F48DC81FB5CB32E59B7F6A /* AFURLResponseSerialization.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = AFURLResponseSerialization.m; path = AFNetworking/AFURLResponseSerialization.m; sourceTree = "<group>"; };
|
||||
76BE0995812A6012E13ED94FD850C094 /* SUAppcast.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = SUAppcast.h; path = Sparkle.framework/Versions/A/Headers/SUAppcast.h; sourceTree = "<group>"; };
|
||||
7C15BE257E43CF1133E3386EE946F85F /* SUStandardVersionComparator.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = SUStandardVersionComparator.h; path = Sparkle.framework/Versions/A/Headers/SUStandardVersionComparator.h; sourceTree = "<group>"; };
|
||||
8107B6D98F8826D2BDF1836AE197E8DA /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
81559CD4749E24F5A08967814EB5B566 /* AFNetworking.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = AFNetworking.modulemap; sourceTree = "<group>"; };
|
||||
85956FD425203BF735FC3953DBAB02CF /* AFNetworkReachabilityManager.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = AFNetworkReachabilityManager.h; path = AFNetworking/AFNetworkReachabilityManager.h; sourceTree = "<group>"; };
|
||||
8D5378B0C668E5A62D5F0B3B78B2E6E9 /* STPrivilegedTask.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = STPrivilegedTask.h; sourceTree = "<group>"; };
|
||||
8EC096F1188BF92116D7C3EBA063FFAE /* AFURLResponseSerialization.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = AFURLResponseSerialization.h; path = AFNetworking/AFURLResponseSerialization.h; sourceTree = "<group>"; };
|
||||
93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
|
||||
9AEEDAE52C838EE185B69A0CADA31447 /* STPrivilegedTask.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = STPrivilegedTask.m; sourceTree = "<group>"; };
|
||||
9D522307F2EBECEFCD1DE0E41BA4AA20 /* SUErrors.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = SUErrors.h; path = Sparkle.framework/Versions/A/Headers/SUErrors.h; sourceTree = "<group>"; };
|
||||
AF4E372BA1026D581DC820A913E4C2D5 /* AFNetworking.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = AFNetworking.framework; path = AFNetworking.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
B2488968A8EB9E5438171F611A5FF279 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
B78C9CF038C193C7DB5E375A34A4DF57 /* AFSecurityPolicy.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = AFSecurityPolicy.h; path = AFNetworking/AFSecurityPolicy.h; sourceTree = "<group>"; };
|
||||
BE22F664FEF8BCA77E5885D07E7C24D8 /* Pods-eqMac2-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-eqMac2-acknowledgements.plist"; sourceTree = "<group>"; };
|
||||
C0E621EF704DF24AB8884D511C756649 /* STPrivilegedTask.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = STPrivilegedTask.modulemap; sourceTree = "<group>"; };
|
||||
C40B50CBF6BA80EE2004AA959D821D57 /* STPrivilegedTask-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "STPrivilegedTask-dummy.m"; sourceTree = "<group>"; };
|
||||
CDD7126A1F231838337C367CFCBDBE59 /* SUUpdaterDelegate.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = SUUpdaterDelegate.h; path = Sparkle.framework/Versions/A/Headers/SUUpdaterDelegate.h; sourceTree = "<group>"; };
|
||||
D7D36362406F7F2F95E9DA1E27A7BD53 /* Pods-eqMac2.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-eqMac2.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
DD4A1158067B9FDDE4C3D58D13C39A84 /* STPrivilegedTask-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "STPrivilegedTask-umbrella.h"; sourceTree = "<group>"; };
|
||||
DE729AD652C7922626ADECB9CD400A7E /* Pods-eqMac2-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-eqMac2-acknowledgements.markdown"; sourceTree = "<group>"; };
|
||||
E2DDAE6BBA8C782C2552B9086D45D8EA /* STPrivilegedTask.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = STPrivilegedTask.xcconfig; sourceTree = "<group>"; };
|
||||
E35F6A821F03C20D7776708F7F389B96 /* Pods-eqMac2-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-eqMac2-dummy.m"; sourceTree = "<group>"; };
|
||||
E6015635AB807FD389DA4EE47281EF4F /* SUExport.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = SUExport.h; path = Sparkle.framework/Versions/A/Headers/SUExport.h; sourceTree = "<group>"; };
|
||||
EA15F614598112000CD42FFB969923C8 /* Pods-eqMac2-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-eqMac2-umbrella.h"; sourceTree = "<group>"; };
|
||||
EB461E748A55FFA05AA583FEB9D5BF2B /* AFURLSessionManager.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = AFURLSessionManager.m; path = AFNetworking/AFURLSessionManager.m; sourceTree = "<group>"; };
|
||||
EBCC85399EA7E4FD8AADBA88B2CCB918 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Cocoa.framework; sourceTree = DEVELOPER_DIR; };
|
||||
EF091E289D6732A789C2055E8A9C8B06 /* STPrivilegedTask.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = STPrivilegedTask.framework; path = STPrivilegedTask.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
F27B4416E1DA870AD68E33E6AD69880D /* SUAppcastItem.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = SUAppcastItem.h; path = Sparkle.framework/Versions/A/Headers/SUAppcastItem.h; sourceTree = "<group>"; };
|
||||
F7892C2662B8D3F62F8AF900BC74BFEC /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Security.framework; sourceTree = DEVELOPER_DIR; };
|
||||
FBE93C89A9EF8A2A9253961AD83762BE /* SUVersionComparisonProtocol.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = SUVersionComparisonProtocol.h; path = Sparkle.framework/Versions/A/Headers/SUVersionComparisonProtocol.h; sourceTree = "<group>"; };
|
||||
FCDB8FC444F23B2325D9AE08C9B8860A /* AFNetworking-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "AFNetworking-prefix.pch"; sourceTree = "<group>"; };
|
||||
FD572838B8C688222B3955F28FF1B332 /* AFURLRequestSerialization.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = AFURLRequestSerialization.m; path = AFNetworking/AFURLRequestSerialization.m; sourceTree = "<group>"; };
|
||||
FDE2E7E5F031277BE425A629D3D4094B /* Pods-eqMac2-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-eqMac2-frameworks.sh"; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
2FBEB0D2DF6FCC5C237B3A30C21B5C65 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
C8B257232D03D40C8AD2C8146014A238 /* Cocoa.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
BB197D58020109AE65030A6D134DBF20 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
96C4828616AE0C7FFDD7B37B855B01C6 /* Cocoa.framework in Frameworks */,
|
||||
8548B3DE3031FEDA82A3EDC606D8BC07 /* Security.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
C7FE4A0B5A9637B8D937B25762CE3EE7 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
204E0CAC8785C3C23FC490126DB30ABD /* Cocoa.framework in Frameworks */,
|
||||
7AAB67FE20184F8327EF97DAB8A5413B /* CoreServices.framework in Frameworks */,
|
||||
1A2D260D68A1F7E7F6F45B8C453335BA /* Security.framework in Frameworks */,
|
||||
CD017CD539465D295172FC7F6188CD57 /* SystemConfiguration.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
02618D2ED8FF68FD8339070E6FA3FCBE /* Pods */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8E2B3305D18AC7D66EE0EEF3138E7410 /* AFNetworking */,
|
||||
9F6081F818294F7D7D73D9487E2BE7B4 /* Sparkle */,
|
||||
3F32C2ADEC366661AC5FA69E7EB9652D /* STPrivilegedTask */,
|
||||
);
|
||||
name = Pods;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
02C9A5473D131A95336E89E02551D890 /* Reachability */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
85956FD425203BF735FC3953DBAB02CF /* AFNetworkReachabilityManager.h */,
|
||||
409FEE7877D3DE61497F7E20FA56B78D /* AFNetworkReachabilityManager.m */,
|
||||
);
|
||||
name = Reachability;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
3F32C2ADEC366661AC5FA69E7EB9652D /* STPrivilegedTask */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8D5378B0C668E5A62D5F0B3B78B2E6E9 /* STPrivilegedTask.h */,
|
||||
9AEEDAE52C838EE185B69A0CADA31447 /* STPrivilegedTask.m */,
|
||||
8DA8C3C8813221F7C4571102BE585585 /* Support Files */,
|
||||
);
|
||||
name = STPrivilegedTask;
|
||||
path = STPrivilegedTask;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
41BB576F36773F3DF71930C3F285B493 /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
0E543380CDA914C8454BD181D305C58D /* Sparkle.framework */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
4B07CF1B8A16A5A1457E00563B0BB4C1 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
AF4E372BA1026D581DC820A913E4C2D5 /* AFNetworking.framework */,
|
||||
038D3280C055AEAA7431F9EBADD47C0C /* Pods_eqMac2.framework */,
|
||||
EF091E289D6732A789C2055E8A9C8B06 /* STPrivilegedTask.framework */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
54E7E2B5DD3A9FA58A6CF5963AE2F074 /* Support Files */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
81559CD4749E24F5A08967814EB5B566 /* AFNetworking.modulemap */,
|
||||
0C441D26F57493C880046A78F5C73F84 /* AFNetworking.xcconfig */,
|
||||
5C838592D39C0B2E67A05358E0406604 /* AFNetworking-dummy.m */,
|
||||
FCDB8FC444F23B2325D9AE08C9B8860A /* AFNetworking-prefix.pch */,
|
||||
3228FFA395E3BAC2F8889F89459BFB93 /* AFNetworking-umbrella.h */,
|
||||
B2488968A8EB9E5438171F611A5FF279 /* Info.plist */,
|
||||
);
|
||||
name = "Support Files";
|
||||
path = "../Target Support Files/AFNetworking";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
5A8561B9A8D9E62204696E4D76C18D14 /* OS X */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
EBCC85399EA7E4FD8AADBA88B2CCB918 /* Cocoa.framework */,
|
||||
15E7226E387551A60AD8298074197731 /* CoreServices.framework */,
|
||||
F7892C2662B8D3F62F8AF900BC74BFEC /* Security.framework */,
|
||||
1C9B4D017CBF32E657321A46935A4388 /* SystemConfiguration.framework */,
|
||||
);
|
||||
name = "OS X";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
5F5FC984ABA0D0051ADCE98C2EE0AE67 /* Pods-eqMac2 */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8107B6D98F8826D2BDF1836AE197E8DA /* Info.plist */,
|
||||
6B565B1332AB54FD3EE033038D9BAEBA /* Pods-eqMac2.modulemap */,
|
||||
DE729AD652C7922626ADECB9CD400A7E /* Pods-eqMac2-acknowledgements.markdown */,
|
||||
BE22F664FEF8BCA77E5885D07E7C24D8 /* Pods-eqMac2-acknowledgements.plist */,
|
||||
E35F6A821F03C20D7776708F7F389B96 /* Pods-eqMac2-dummy.m */,
|
||||
FDE2E7E5F031277BE425A629D3D4094B /* Pods-eqMac2-frameworks.sh */,
|
||||
620F1AC2CB5C9AEC0AC0AD9566B8670B /* Pods-eqMac2-resources.sh */,
|
||||
EA15F614598112000CD42FFB969923C8 /* Pods-eqMac2-umbrella.h */,
|
||||
D7D36362406F7F2F95E9DA1E27A7BD53 /* Pods-eqMac2.debug.xcconfig */,
|
||||
426C509E7F1C282ED9C3301F93490738 /* Pods-eqMac2.release.xcconfig */,
|
||||
);
|
||||
name = "Pods-eqMac2";
|
||||
path = "Target Support Files/Pods-eqMac2";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
74ABAA93CB107A84FB7424368F7DA9E9 /* NSURLSession */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
547748B9DE015ED854B4125406BC7ED4 /* AFHTTPSessionManager.h */,
|
||||
360F0B7A1758A64A9D7764A41812FFE9 /* AFHTTPSessionManager.m */,
|
||||
0F510865480CACBAA83D039AD31648BD /* AFURLSessionManager.h */,
|
||||
EB461E748A55FFA05AA583FEB9D5BF2B /* AFURLSessionManager.m */,
|
||||
);
|
||||
name = NSURLSession;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
7DB346D0F39D3F0E887471402A8071AB = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */,
|
||||
CD75D5B60FCA72FBF7F9C770460B2C26 /* Frameworks */,
|
||||
02618D2ED8FF68FD8339070E6FA3FCBE /* Pods */,
|
||||
4B07CF1B8A16A5A1457E00563B0BB4C1 /* Products */,
|
||||
8709484BA18CF9C27538E0E4AC614A1A /* Targets Support Files */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8709484BA18CF9C27538E0E4AC614A1A /* Targets Support Files */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
5F5FC984ABA0D0051ADCE98C2EE0AE67 /* Pods-eqMac2 */,
|
||||
);
|
||||
name = "Targets Support Files";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8DA8C3C8813221F7C4571102BE585585 /* Support Files */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
55CDFDCAE31CEF7E278251969C55261C /* Info.plist */,
|
||||
C0E621EF704DF24AB8884D511C756649 /* STPrivilegedTask.modulemap */,
|
||||
E2DDAE6BBA8C782C2552B9086D45D8EA /* STPrivilegedTask.xcconfig */,
|
||||
C40B50CBF6BA80EE2004AA959D821D57 /* STPrivilegedTask-dummy.m */,
|
||||
340BD4CB79CD93D9C1BF30D714F60E80 /* STPrivilegedTask-prefix.pch */,
|
||||
DD4A1158067B9FDDE4C3D58D13C39A84 /* STPrivilegedTask-umbrella.h */,
|
||||
);
|
||||
name = "Support Files";
|
||||
path = "../Target Support Files/STPrivilegedTask";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8E2B3305D18AC7D66EE0EEF3138E7410 /* AFNetworking */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
0AFCE97C1EA53292C5564E889FC9904E /* AFNetworking.h */,
|
||||
74ABAA93CB107A84FB7424368F7DA9E9 /* NSURLSession */,
|
||||
02C9A5473D131A95336E89E02551D890 /* Reachability */,
|
||||
9906842A08A505BF8F6BDADDCB741B94 /* Security */,
|
||||
ABE86436D80ABAB1024E24108A451B2E /* Serialization */,
|
||||
54E7E2B5DD3A9FA58A6CF5963AE2F074 /* Support Files */,
|
||||
);
|
||||
name = AFNetworking;
|
||||
path = AFNetworking;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9906842A08A505BF8F6BDADDCB741B94 /* Security */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
B78C9CF038C193C7DB5E375A34A4DF57 /* AFSecurityPolicy.h */,
|
||||
50927E552E15F59C005128F4B70A2903 /* AFSecurityPolicy.m */,
|
||||
);
|
||||
name = Security;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9F6081F818294F7D7D73D9487E2BE7B4 /* Sparkle */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
5BE97DA81C123696A2E0AFB9998CB9AC /* Sparkle.h */,
|
||||
76BE0995812A6012E13ED94FD850C094 /* SUAppcast.h */,
|
||||
F27B4416E1DA870AD68E33E6AD69880D /* SUAppcastItem.h */,
|
||||
9D522307F2EBECEFCD1DE0E41BA4AA20 /* SUErrors.h */,
|
||||
E6015635AB807FD389DA4EE47281EF4F /* SUExport.h */,
|
||||
7C15BE257E43CF1133E3386EE946F85F /* SUStandardVersionComparator.h */,
|
||||
57C0DA8D4FD708C9C6C1666C2E183C27 /* SUUpdater.h */,
|
||||
CDD7126A1F231838337C367CFCBDBE59 /* SUUpdaterDelegate.h */,
|
||||
FBE93C89A9EF8A2A9253961AD83762BE /* SUVersionComparisonProtocol.h */,
|
||||
2DFB384BD4E2B9EB8A688D54D42BD097 /* SUVersionDisplayProtocol.h */,
|
||||
41BB576F36773F3DF71930C3F285B493 /* Frameworks */,
|
||||
);
|
||||
name = Sparkle;
|
||||
path = Sparkle;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
ABE86436D80ABAB1024E24108A451B2E /* Serialization */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
2C55D83601E692E6582A29C56C658047 /* AFURLRequestSerialization.h */,
|
||||
FD572838B8C688222B3955F28FF1B332 /* AFURLRequestSerialization.m */,
|
||||
8EC096F1188BF92116D7C3EBA063FFAE /* AFURLResponseSerialization.h */,
|
||||
748D3E75C2F48DC81FB5CB32E59B7F6A /* AFURLResponseSerialization.m */,
|
||||
);
|
||||
name = Serialization;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
CD75D5B60FCA72FBF7F9C770460B2C26 /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
5A8561B9A8D9E62204696E4D76C18D14 /* OS X */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXHeadersBuildPhase section */
|
||||
83B2C24E2A7A5AEC3E555385CF76B407 /* Headers */ = {
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
431DFB318A8CD33D6687DBA35E64F2D5 /* Pods-eqMac2-umbrella.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
84BF8B6A4B8B9DB3A7DDF82EC0985136 /* Headers */ = {
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
C75CFC70A4C40A704A802E767BE45BAF /* AFHTTPSessionManager.h in Headers */,
|
||||
C23BE8D14A6CDEE6CC7D832F0DB7F844 /* AFNetworking-umbrella.h in Headers */,
|
||||
37CF7097CCADBB46D440FF03D568D8DB /* AFNetworking.h in Headers */,
|
||||
7331F7D7B9C4F385A0658A682C3487D4 /* AFNetworkReachabilityManager.h in Headers */,
|
||||
E624CA2A0A4CBAB333AEE996F6183CB3 /* AFSecurityPolicy.h in Headers */,
|
||||
F8BB578914183F0CAE4BB035154959C5 /* AFURLRequestSerialization.h in Headers */,
|
||||
2B260ABA06488D6B1C0C27FB5E440C33 /* AFURLResponseSerialization.h in Headers */,
|
||||
CFF537E91FEAA79997CC68B8380E7FC8 /* AFURLSessionManager.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
FC0282D5834AD72BC76B735C35E6BA3F /* Headers */ = {
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
9AE62DBF57A62DD23D8C84EA072E54D7 /* STPrivilegedTask-umbrella.h in Headers */,
|
||||
1BBB2ADFD6670A0B744D63931C73B989 /* STPrivilegedTask.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXHeadersBuildPhase section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
70C8B777F8F142ABDED308DCC68355C0 /* STPrivilegedTask */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 28495B80A734103495E6E5FAFCD84C34 /* Build configuration list for PBXNativeTarget "STPrivilegedTask" */;
|
||||
buildPhases = (
|
||||
AC07AE4D4D5265A27A4029C503E95FE0 /* Sources */,
|
||||
BB197D58020109AE65030A6D134DBF20 /* Frameworks */,
|
||||
FC0282D5834AD72BC76B735C35E6BA3F /* Headers */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = STPrivilegedTask;
|
||||
productName = STPrivilegedTask;
|
||||
productReference = EF091E289D6732A789C2055E8A9C8B06 /* STPrivilegedTask.framework */;
|
||||
productType = "com.apple.product-type.framework";
|
||||
};
|
||||
CF937694CA889245A8C5AF2883B27BB9 /* AFNetworking */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = CA4D5838784ECA3F70B9D27E2CC83D10 /* Build configuration list for PBXNativeTarget "AFNetworking" */;
|
||||
buildPhases = (
|
||||
4798ADB3505BCE138EDAF5D4D6710D00 /* Sources */,
|
||||
C7FE4A0B5A9637B8D937B25762CE3EE7 /* Frameworks */,
|
||||
84BF8B6A4B8B9DB3A7DDF82EC0985136 /* Headers */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = AFNetworking;
|
||||
productName = AFNetworking;
|
||||
productReference = AF4E372BA1026D581DC820A913E4C2D5 /* AFNetworking.framework */;
|
||||
productType = "com.apple.product-type.framework";
|
||||
};
|
||||
F55F2C20EA9A95C8D1D70F4577839B24 /* Pods-eqMac2 */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 3C3818EB05CDCD28FDDDE32DB265B483 /* Build configuration list for PBXNativeTarget "Pods-eqMac2" */;
|
||||
buildPhases = (
|
||||
E4D4B260C02083FA15B71CEEEF62EBC4 /* Sources */,
|
||||
2FBEB0D2DF6FCC5C237B3A30C21B5C65 /* Frameworks */,
|
||||
83B2C24E2A7A5AEC3E555385CF76B407 /* Headers */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
DDF4906E1658AFF3137304FD8D19BCE2 /* PBXTargetDependency */,
|
||||
8CB43D4999D7087765D108CFE9AF2136 /* PBXTargetDependency */,
|
||||
);
|
||||
name = "Pods-eqMac2";
|
||||
productName = "Pods-eqMac2";
|
||||
productReference = 038D3280C055AEAA7431F9EBADD47C0C /* Pods_eqMac2.framework */;
|
||||
productType = "com.apple.product-type.framework";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
D41D8CD98F00B204E9800998ECF8427E /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastSwiftUpdateCheck = 0730;
|
||||
LastUpgradeCheck = 0700;
|
||||
};
|
||||
buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
);
|
||||
mainGroup = 7DB346D0F39D3F0E887471402A8071AB;
|
||||
productRefGroup = 4B07CF1B8A16A5A1457E00563B0BB4C1 /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
CF937694CA889245A8C5AF2883B27BB9 /* AFNetworking */,
|
||||
F55F2C20EA9A95C8D1D70F4577839B24 /* Pods-eqMac2 */,
|
||||
70C8B777F8F142ABDED308DCC68355C0 /* STPrivilegedTask */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
4798ADB3505BCE138EDAF5D4D6710D00 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
1273B3EAB642704E8C611DCFEC0DCDF4 /* AFHTTPSessionManager.m in Sources */,
|
||||
F926308C0EF84649F76B7CB998C5D16D /* AFNetworking-dummy.m in Sources */,
|
||||
DD4B08CF945D4E33ED94EE0436F7E454 /* AFNetworkReachabilityManager.m in Sources */,
|
||||
03ADE51412DADB5E1B2D2DFA311AB858 /* AFSecurityPolicy.m in Sources */,
|
||||
1DCC0B01F14FD97F84908877ADD69C8D /* AFURLRequestSerialization.m in Sources */,
|
||||
075CEC6B154EFB77AC3AB9244194166B /* AFURLResponseSerialization.m in Sources */,
|
||||
D03FF20282808A13DF33D192D26A6B96 /* AFURLSessionManager.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
AC07AE4D4D5265A27A4029C503E95FE0 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
84CB94BA77148BFD07109B676D300BA0 /* STPrivilegedTask-dummy.m in Sources */,
|
||||
CAF143DA5A1D21860A5B52BE3D8EE72A /* STPrivilegedTask.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
E4D4B260C02083FA15B71CEEEF62EBC4 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
A550C24F30F53734F6587C397FA06370 /* Pods-eqMac2-dummy.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
8CB43D4999D7087765D108CFE9AF2136 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
name = STPrivilegedTask;
|
||||
target = 70C8B777F8F142ABDED308DCC68355C0 /* STPrivilegedTask */;
|
||||
targetProxy = 5E0322D512CF6D0189A76B4100ED0920 /* PBXContainerItemProxy */;
|
||||
};
|
||||
DDF4906E1658AFF3137304FD8D19BCE2 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
name = AFNetworking;
|
||||
target = CF937694CA889245A8C5AF2883B27BB9 /* AFNetworking */;
|
||||
targetProxy = 0F857ADDFD8E2287B5701E3E1D423ACE /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
565B2EDB14BE11FDD9DD295CAD7BEFC9 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = D7D36362406F7F2F95E9DA1E27A7BD53 /* Pods-eqMac2.debug.xcconfig */;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD)";
|
||||
CODE_SIGN_IDENTITY = "-";
|
||||
"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
|
||||
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
DEFINES_MODULE = YES;
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
FRAMEWORK_VERSION = A;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
INFOPLIST_FILE = "Target Support Files/Pods-eqMac2/Info.plist";
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
|
||||
MACH_O_TYPE = staticlib;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.10;
|
||||
MODULEMAP_FILE = "Target Support Files/Pods-eqMac2/Pods-eqMac2.modulemap";
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
OTHER_LDFLAGS = "";
|
||||
OTHER_LIBTOOLFLAGS = "";
|
||||
PODS_ROOT = "$(SRCROOT)";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}";
|
||||
PRODUCT_NAME = Pods_eqMac2;
|
||||
SDKROOT = macosx;
|
||||
SKIP_INSTALL = YES;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
56CE872F498B3EEA74FF1B2FB8300AD0 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 0C441D26F57493C880046A78F5C73F84 /* AFNetworking.xcconfig */;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD)";
|
||||
CODE_SIGN_IDENTITY = "-";
|
||||
"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
|
||||
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
DEFINES_MODULE = YES;
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
FRAMEWORK_VERSION = A;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_PREFIX_HEADER = "Target Support Files/AFNetworking/AFNetworking-prefix.pch";
|
||||
INFOPLIST_FILE = "Target Support Files/AFNetworking/Info.plist";
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.9;
|
||||
MODULEMAP_FILE = "Target Support Files/AFNetworking/AFNetworking.modulemap";
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
PRODUCT_NAME = AFNetworking;
|
||||
SDKROOT = macosx;
|
||||
SKIP_INSTALL = YES;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
6719EFD308B74F649B41CD517C5BFBA0 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 0C441D26F57493C880046A78F5C73F84 /* AFNetworking.xcconfig */;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD)";
|
||||
CODE_SIGN_IDENTITY = "-";
|
||||
"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
|
||||
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
DEFINES_MODULE = YES;
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
FRAMEWORK_VERSION = A;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_PREFIX_HEADER = "Target Support Files/AFNetworking/AFNetworking-prefix.pch";
|
||||
INFOPLIST_FILE = "Target Support Files/AFNetworking/Info.plist";
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.9;
|
||||
MODULEMAP_FILE = "Target Support Files/AFNetworking/AFNetworking.modulemap";
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
PRODUCT_NAME = AFNetworking;
|
||||
SDKROOT = macosx;
|
||||
SKIP_INSTALL = YES;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
7F7AEB1EBEAB6FE7C32C79E12B133F79 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = E2DDAE6BBA8C782C2552B9086D45D8EA /* STPrivilegedTask.xcconfig */;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD)";
|
||||
CODE_SIGN_IDENTITY = "-";
|
||||
"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
|
||||
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
DEFINES_MODULE = YES;
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
FRAMEWORK_VERSION = A;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_PREFIX_HEADER = "Target Support Files/STPrivilegedTask/STPrivilegedTask-prefix.pch";
|
||||
INFOPLIST_FILE = "Target Support Files/STPrivilegedTask/Info.plist";
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.6;
|
||||
MODULEMAP_FILE = "Target Support Files/STPrivilegedTask/STPrivilegedTask.modulemap";
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
PRODUCT_NAME = STPrivilegedTask;
|
||||
SDKROOT = macosx;
|
||||
SKIP_INSTALL = YES;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
9420A7205B8F85520AF134F4EE25F7CC /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGNING_REQUIRED = NO;
|
||||
COPY_PHASE_STRIP = YES;
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"POD_CONFIGURATION_RELEASE=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
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.10;
|
||||
PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/;
|
||||
STRIP_INSTALLED_PRODUCT = NO;
|
||||
SYMROOT = "${SRCROOT}/../build";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
A62EB51AFF116EFE34D7F5E0F93353F6 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = E2DDAE6BBA8C782C2552B9086D45D8EA /* STPrivilegedTask.xcconfig */;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD)";
|
||||
CODE_SIGN_IDENTITY = "-";
|
||||
"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
|
||||
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
DEFINES_MODULE = YES;
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
FRAMEWORK_VERSION = A;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_PREFIX_HEADER = "Target Support Files/STPrivilegedTask/STPrivilegedTask-prefix.pch";
|
||||
INFOPLIST_FILE = "Target Support Files/STPrivilegedTask/Info.plist";
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.6;
|
||||
MODULEMAP_FILE = "Target Support Files/STPrivilegedTask/STPrivilegedTask.modulemap";
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
PRODUCT_NAME = STPrivilegedTask;
|
||||
SDKROOT = macosx;
|
||||
SKIP_INSTALL = YES;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
F0FF3202B5D653152630B2C476287958 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 426C509E7F1C282ED9C3301F93490738 /* Pods-eqMac2.release.xcconfig */;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD)";
|
||||
CODE_SIGN_IDENTITY = "-";
|
||||
"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
|
||||
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
DEFINES_MODULE = YES;
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
FRAMEWORK_VERSION = A;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
INFOPLIST_FILE = "Target Support Files/Pods-eqMac2/Info.plist";
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
|
||||
MACH_O_TYPE = staticlib;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.10;
|
||||
MODULEMAP_FILE = "Target Support Files/Pods-eqMac2/Pods-eqMac2.modulemap";
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
OTHER_LDFLAGS = "";
|
||||
OTHER_LIBTOOLFLAGS = "";
|
||||
PODS_ROOT = "$(SRCROOT)";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}";
|
||||
PRODUCT_NAME = Pods_eqMac2;
|
||||
SDKROOT = macosx;
|
||||
SKIP_INSTALL = YES;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
F653E316AB5F825D3AD0CAE700E37071 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGNING_REQUIRED = NO;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"POD_CONFIGURATION_DEBUG=1",
|
||||
"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.10;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/;
|
||||
STRIP_INSTALLED_PRODUCT = NO;
|
||||
SYMROOT = "${SRCROOT}/../build";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
28495B80A734103495E6E5FAFCD84C34 /* Build configuration list for PBXNativeTarget "STPrivilegedTask" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
7F7AEB1EBEAB6FE7C32C79E12B133F79 /* Debug */,
|
||||
A62EB51AFF116EFE34D7F5E0F93353F6 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
F653E316AB5F825D3AD0CAE700E37071 /* Debug */,
|
||||
9420A7205B8F85520AF134F4EE25F7CC /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
3C3818EB05CDCD28FDDDE32DB265B483 /* Build configuration list for PBXNativeTarget "Pods-eqMac2" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
565B2EDB14BE11FDD9DD295CAD7BEFC9 /* Debug */,
|
||||
F0FF3202B5D653152630B2C476287958 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
CA4D5838784ECA3F70B9D27E2CC83D10 /* Build configuration list for PBXNativeTarget "AFNetworking" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
6719EFD308B74F649B41CD517C5BFBA0 /* Debug */,
|
||||
56CE872F498B3EEA74FF1B2FB8300AD0 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = D41D8CD98F00B204E9800998ECF8427E /* Project object */;
|
||||
}
|
@ -1,60 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0700"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForAnalyzing = "YES"
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = 'primary'
|
||||
BlueprintIdentifier = 'CF937694CA889245A8C5AF2883B27BB9'
|
||||
BlueprintName = 'AFNetworking'
|
||||
ReferencedContainer = 'container:Pods.xcodeproj'
|
||||
BuildableName = 'AFNetworking.framework'>
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
buildConfiguration = "Debug">
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
buildConfiguration = "Debug"
|
||||
allowLocationSimulation = "YES">
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
@ -1,71 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0700"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "F55F2C20EA9A95C8D1D70F4577839B24"
|
||||
BuildableName = "Pods_eqMac2.framework"
|
||||
BlueprintName = "Pods-eqMac2"
|
||||
ReferencedContainer = "container:Pods.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "F55F2C20EA9A95C8D1D70F4577839B24"
|
||||
BuildableName = "Pods_eqMac2.framework"
|
||||
BlueprintName = "Pods-eqMac2"
|
||||
ReferencedContainer = "container:Pods.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
@ -1,60 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0700"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForAnalyzing = "YES"
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = 'primary'
|
||||
BlueprintIdentifier = '70C8B777F8F142ABDED308DCC68355C0'
|
||||
BlueprintName = 'STPrivilegedTask'
|
||||
ReferencedContainer = 'container:Pods.xcodeproj'
|
||||
BuildableName = 'STPrivilegedTask.framework'>
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
buildConfiguration = "Debug">
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
buildConfiguration = "Debug"
|
||||
allowLocationSimulation = "YES">
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
@ -1,42 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>SchemeUserState</key>
|
||||
<dict>
|
||||
<key>AFNetworking.xcscheme</key>
|
||||
<dict>
|
||||
<key>isShown</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<key>Pods-eqMac2.xcscheme</key>
|
||||
<dict>
|
||||
<key>isShown</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<key>STPrivilegedTask.xcscheme</key>
|
||||
<dict>
|
||||
<key>isShown</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>SuppressBuildableAutocreation</key>
|
||||
<dict>
|
||||
<key>70C8B777F8F142ABDED308DCC68355C0</key>
|
||||
<dict>
|
||||
<key>primary</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>CF937694CA889245A8C5AF2883B27BB9</key>
|
||||
<dict>
|
||||
<key>primary</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>F55F2C20EA9A95C8D1D70F4577839B24</key>
|
||||
<dict>
|
||||
<key>primary</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
22
Pods/STPrivilegedTask/LICENSE.txt
generated
22
Pods/STPrivilegedTask/LICENSE.txt
generated
@ -1,22 +0,0 @@
|
||||
# BSD License
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * 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.
|
||||
# * Neither the name of Sveinbjorn Thordarson nor that of any other
|
||||
# contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# 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 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.
|
58
Pods/STPrivilegedTask/README.md
generated
58
Pods/STPrivilegedTask/README.md
generated
@ -1,58 +0,0 @@
|
||||
# STPrivilegedTask - Objective C class
|
||||
|
||||
An NSTask-like wrapper around AuthorizationExecuteWithPrivileges() in the Security API to run shell commands with root privileges in Mac OS X.
|
||||
|
||||
Example of usage:
|
||||
|
||||
```objective-c
|
||||
STPrivilegedTask *privilegedTask = [[STPrivilegedTask alloc] init];
|
||||
|
||||
[privilegedTask setLaunchPath:@"/usr/bin/touch"];
|
||||
NSArray *args = [NSArray arrayWithObject:@"/etc/my_test_file"];
|
||||
[privilegedTask setArguments:args];
|
||||
[privilegedTask setCurrentDirectoryPath:[[NSBundle mainBundle] resourcePath]];
|
||||
|
||||
//set it off
|
||||
OSStatus err = [privilegedTask launch];
|
||||
if (err != errAuthorizationSuccess) {
|
||||
if (err == errAuthorizationCanceled) {
|
||||
NSLog(@"User cancelled");
|
||||
} else {
|
||||
NSLog(@"Something went wrong");
|
||||
}
|
||||
}
|
||||
|
||||
// Read output file handle for data
|
||||
NSFileHandle *readHandle = [privilegedTask outputFileHandle];
|
||||
NSData *outputData = [readHandle readDataToEndOfFile];
|
||||
NSString *outputString = [[NSString alloc] initWithData:outputData encoding:NSUTF8StringEncoding];
|
||||
|
||||
```
|
||||
|
||||
# BSD License
|
||||
|
||||
```
|
||||
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * 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.
|
||||
# * Neither the name of Sveinbjorn Thordarson nor that of any other
|
||||
# contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# 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 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.
|
||||
|
||||
```
|
81
Pods/STPrivilegedTask/STPrivilegedTask.h
generated
81
Pods/STPrivilegedTask/STPrivilegedTask.h
generated
@ -1,81 +0,0 @@
|
||||
/*
|
||||
#
|
||||
# STPrivilegedTask - NSTask-like wrapper around AuthorizationExecuteWithPrivileges
|
||||
# Copyright (C) 2009-2015 Sveinbjorn Thordarson <sveinbjornt@gmail.com>
|
||||
#
|
||||
# BSD License
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * 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.
|
||||
# * Neither the name of Sveinbjorn Thordarson nor that of any other
|
||||
# contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# 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 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.
|
||||
*/
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#import <Carbon/Carbon.h>
|
||||
#import <Security/Authorization.h>
|
||||
#import <Security/AuthorizationTags.h>
|
||||
|
||||
#define STPrivilegedTaskDidTerminateNotification @"STPrivilegedTaskDidTerminateNotification"
|
||||
//#define TMP_STDERR_TEMPLATE @".authStderr.XXXXXX"
|
||||
|
||||
// Defines error value for when AuthorizationExecuteWithPrivilleges no longer
|
||||
// exists anyplace. Rather than defining a new enum, we just create a global
|
||||
// constant
|
||||
extern const OSStatus errAuthorizationFnNoLongerExists;
|
||||
|
||||
@interface STPrivilegedTask : NSObject
|
||||
{
|
||||
NSArray *arguments;
|
||||
NSString *cwd;
|
||||
NSString *launchPath;
|
||||
BOOL isRunning;
|
||||
pid_t pid;
|
||||
int terminationStatus;
|
||||
NSFileHandle *outputFileHandle;
|
||||
NSTimer *checkStatusTimer;
|
||||
}
|
||||
-(id)initWithLaunchPath:(NSString *)path;
|
||||
-(id)initWithLaunchPath:(NSString *)path arguments: (NSArray *)args;
|
||||
+(STPrivilegedTask *)launchedPrivilegedTaskWithLaunchPath:(NSString *)path;
|
||||
+(STPrivilegedTask *)launchedPrivilegedTaskWithLaunchPath:(NSString *)path arguments:(NSArray *)arguments;
|
||||
-(NSArray *)arguments;
|
||||
-(NSString *)currentDirectoryPath;
|
||||
-(BOOL)isRunning;
|
||||
-(int)launch;
|
||||
-(NSString *)launchPath;
|
||||
-(int)processIdentifier;
|
||||
-(void)setArguments:(NSArray *)arguments;
|
||||
-(void)setCurrentDirectoryPath:(NSString *)path;
|
||||
-(void)setLaunchPath:(NSString *)path;
|
||||
-(NSFileHandle *)outputFileHandle;
|
||||
-(void)terminate; // doesn't work
|
||||
-(int)terminationStatus;
|
||||
-(void)_checkTaskStatus;
|
||||
-(void)waitUntilExit;
|
||||
@end
|
||||
/*static OSStatus AuthorizationExecuteWithPrivilegesStdErrAndPid (
|
||||
AuthorizationRef authorization,
|
||||
const char *pathToTool,
|
||||
AuthorizationFlags options,
|
||||
char * const *arguments,
|
||||
FILE **communicationsPipe,
|
||||
FILE **errPipe,
|
||||
pid_t* processid
|
||||
);*/
|
461
Pods/STPrivilegedTask/STPrivilegedTask.m
generated
461
Pods/STPrivilegedTask/STPrivilegedTask.m
generated
@ -1,461 +0,0 @@
|
||||
/*
|
||||
#
|
||||
# STPrivilegedTask - NSTask-like wrapper around AuthorizationExecuteWithPrivileges
|
||||
# Copyright (C) 2009-2015 Sveinbjorn Thordarson <sveinbjornt@gmail.com>
|
||||
#
|
||||
# BSD License
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * 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.
|
||||
# * Neither the name of Sveinbjorn Thordarson nor that of any other
|
||||
# contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# 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 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.
|
||||
*/
|
||||
|
||||
#import "STPrivilegedTask.h"
|
||||
#import <stdio.h>
|
||||
#import <unistd.h>
|
||||
#import <dlfcn.h>
|
||||
|
||||
/* New error code denoting that AuthorizationExecuteWithPrivileges no longer exists */
|
||||
OSStatus const errAuthorizationFnNoLongerExists = -70001;
|
||||
|
||||
@implementation STPrivilegedTask
|
||||
|
||||
- (id)init
|
||||
{
|
||||
if ((self = [super init])) {
|
||||
launchPath = @"";
|
||||
cwd = [[NSString alloc] initWithString:[[NSFileManager defaultManager] currentDirectoryPath]];
|
||||
arguments = [[NSArray alloc] init];
|
||||
isRunning = NO;
|
||||
outputFileHandle = nil;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
-(void)dealloc
|
||||
{
|
||||
#if !__has_feature(objc_arc)
|
||||
[launchPath release];
|
||||
[arguments release];
|
||||
[cwd release];
|
||||
|
||||
if (outputFileHandle != nil) {
|
||||
[outputFileHandle release];
|
||||
}
|
||||
[super dealloc];
|
||||
#endif
|
||||
}
|
||||
|
||||
-(id)initWithLaunchPath:(NSString *)path arguments:(NSArray *)args
|
||||
{
|
||||
if ((self = [self initWithLaunchPath:path])) {
|
||||
[self setArguments:args];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
-(id)initWithLaunchPath:(NSString *)path
|
||||
{
|
||||
if ((self = [self init])) {
|
||||
[self setLaunchPath:path];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
|
||||
+(STPrivilegedTask *)launchedPrivilegedTaskWithLaunchPath:(NSString *)path arguments:(NSArray *)args
|
||||
{
|
||||
STPrivilegedTask *task = [[STPrivilegedTask alloc] initWithLaunchPath:path arguments:args];
|
||||
#if !__has_feature(objc_arc)
|
||||
[task autorelease];
|
||||
#endif
|
||||
|
||||
[task launch];
|
||||
[task waitUntilExit];
|
||||
return task;
|
||||
}
|
||||
|
||||
+(STPrivilegedTask *)launchedPrivilegedTaskWithLaunchPath:(NSString *)path
|
||||
{
|
||||
STPrivilegedTask *task = [[STPrivilegedTask alloc] initWithLaunchPath:path];
|
||||
#if !__has_feature(objc_arc)
|
||||
[task autorelease];
|
||||
#endif
|
||||
[task launch];
|
||||
[task waitUntilExit];
|
||||
return task;
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
|
||||
- (NSArray *)arguments
|
||||
{
|
||||
return arguments;
|
||||
}
|
||||
|
||||
- (NSString *)currentDirectoryPath;
|
||||
{
|
||||
return cwd;
|
||||
}
|
||||
|
||||
- (BOOL)isRunning
|
||||
{
|
||||
return isRunning;
|
||||
}
|
||||
|
||||
- (NSString *)launchPath
|
||||
{
|
||||
return launchPath;
|
||||
}
|
||||
|
||||
- (int)processIdentifier
|
||||
{
|
||||
return pid;
|
||||
}
|
||||
|
||||
- (int)terminationStatus
|
||||
{
|
||||
return terminationStatus;
|
||||
}
|
||||
|
||||
- (NSFileHandle *)outputFileHandle;
|
||||
{
|
||||
return outputFileHandle;
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
|
||||
-(void)setArguments:(NSArray *)args
|
||||
{
|
||||
#if !__has_feature(objc_arc)
|
||||
[arguments release];
|
||||
[args retain];
|
||||
#endif
|
||||
arguments = args;
|
||||
}
|
||||
|
||||
-(void)setCurrentDirectoryPath:(NSString *)path
|
||||
{
|
||||
#if !__has_feature(objc_arc)
|
||||
[cwd release];
|
||||
[path retain];
|
||||
#endif
|
||||
cwd = path;
|
||||
}
|
||||
|
||||
-(void)setLaunchPath:(NSString *)path
|
||||
{
|
||||
#if !__has_feature(objc_arc)
|
||||
[launchPath release];
|
||||
[path retain];
|
||||
#endif
|
||||
launchPath = path;
|
||||
}
|
||||
|
||||
# pragma mark -
|
||||
|
||||
// return 0 for success
|
||||
-(int)launch
|
||||
{
|
||||
OSStatus err = noErr;
|
||||
const char *toolPath = [launchPath fileSystemRepresentation];
|
||||
|
||||
AuthorizationRef authorizationRef;
|
||||
AuthorizationItem myItems = {kAuthorizationRightExecute, strlen(toolPath), &toolPath, 0};
|
||||
AuthorizationRights myRights = {1, &myItems};
|
||||
AuthorizationFlags flags = kAuthorizationFlagDefaults | kAuthorizationFlagInteractionAllowed | kAuthorizationFlagPreAuthorize | kAuthorizationFlagExtendRights;
|
||||
|
||||
NSUInteger numberOfArguments = [arguments count];
|
||||
char *args[numberOfArguments + 1];
|
||||
FILE *outputFile;
|
||||
|
||||
// Create fn pointer to AuthorizationExecuteWithPrivileges in case it doesn't exist
|
||||
// in this version of MacOS
|
||||
static OSStatus (*_AuthExecuteWithPrivsFn)(
|
||||
AuthorizationRef authorization, const char *pathToTool, AuthorizationFlags options,
|
||||
char * const *arguments, FILE **communicationsPipe) = NULL;
|
||||
|
||||
// Check to see if we have the correct function in our loaded libraries
|
||||
if (!_AuthExecuteWithPrivsFn) {
|
||||
// On 10.7, AuthorizationExecuteWithPrivileges is deprecated. We want
|
||||
// to still use it since there's no good alternative (without requiring
|
||||
// code signing). We'll look up the function through dyld and fail if
|
||||
// it is no longer accessible. If Apple removes the function entirely
|
||||
// this will fail gracefully. If they keep the function and throw some
|
||||
// sort of exception, this won't fail gracefully, but that's a risk
|
||||
// we'll have to take for now.
|
||||
// Pattern by Andy Kim from Potion Factory LLC
|
||||
_AuthExecuteWithPrivsFn = dlsym(RTLD_DEFAULT, "AuthorizationExecuteWithPrivileges");
|
||||
if (!_AuthExecuteWithPrivsFn) {
|
||||
// This version of OS X has finally removed this function. Exit with an error.
|
||||
err = errAuthorizationFnNoLongerExists;
|
||||
return err;
|
||||
}
|
||||
}
|
||||
|
||||
// Use Apple's Authentication Manager APIs to get an Authorization Reference
|
||||
// These Apple APIs are quite possibly the most horrible of the Mac OS X APIs
|
||||
|
||||
// create authorization reference
|
||||
err = AuthorizationCreate(NULL, kAuthorizationEmptyEnvironment, kAuthorizationFlagDefaults, &authorizationRef);
|
||||
if (err != errAuthorizationSuccess) {
|
||||
return err;
|
||||
}
|
||||
|
||||
// pre-authorize the privileged operation
|
||||
err = AuthorizationCopyRights(authorizationRef, &myRights, kAuthorizationEmptyEnvironment, flags, NULL);
|
||||
if (err != errAuthorizationSuccess) {
|
||||
return err;
|
||||
}
|
||||
|
||||
// OK, at this point we have received authorization for the task.
|
||||
// Let's prepare to launch it
|
||||
|
||||
// first, construct an array of c strings from NSArray w. arguments
|
||||
for (int i = 0; i < numberOfArguments; i++) {
|
||||
NSString *argString = arguments[i];
|
||||
NSUInteger stringLength = [argString length];
|
||||
|
||||
args[i] = malloc((stringLength + 1) * sizeof(char));
|
||||
snprintf(args[i], stringLength + 1, "%s", [argString fileSystemRepresentation]);
|
||||
}
|
||||
args[numberOfArguments] = NULL;
|
||||
|
||||
// change to the current dir specified
|
||||
char *prevCwd = (char *)getcwd(nil, 0);
|
||||
chdir([cwd fileSystemRepresentation]);
|
||||
|
||||
//use Authorization Reference to execute script with privileges
|
||||
err = _AuthExecuteWithPrivsFn(authorizationRef, [launchPath fileSystemRepresentation], kAuthorizationFlagDefaults, args, &outputFile);
|
||||
|
||||
// OK, now we're done executing, let's change back to old dir
|
||||
chdir(prevCwd);
|
||||
|
||||
// free the malloc'd argument strings
|
||||
for (int i = 0; i < numberOfArguments; i++) {
|
||||
free(args[i]);
|
||||
}
|
||||
|
||||
// free the auth ref
|
||||
AuthorizationFree(authorizationRef, kAuthorizationFlagDefaults);
|
||||
|
||||
// we return err if execution failed
|
||||
if (err != errAuthorizationSuccess) {
|
||||
return err;
|
||||
} else {
|
||||
isRunning = YES;
|
||||
}
|
||||
|
||||
// get file handle for the command output
|
||||
outputFileHandle = [[NSFileHandle alloc] initWithFileDescriptor:fileno(outputFile) closeOnDealloc:YES];
|
||||
pid = fcntl(fileno(outputFile), F_GETOWN, 0);
|
||||
|
||||
// start monitoring task
|
||||
checkStatusTimer = [NSTimer scheduledTimerWithTimeInterval:0.10 target:self selector:@selector(_checkTaskStatus) userInfo:nil repeats:YES];
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
- (void)terminate
|
||||
{
|
||||
// This doesn't work without a PID, and we can't get one. Stupid Security API
|
||||
/* int ret = kill(pid, SIGKILL);
|
||||
|
||||
if (ret != 0)
|
||||
NSLog(@"Error %d", errno);*/
|
||||
}
|
||||
|
||||
// hang until task is done
|
||||
- (void)waitUntilExit
|
||||
{
|
||||
waitpid([self processIdentifier], &terminationStatus, 0);
|
||||
isRunning = NO;
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
|
||||
// check if privileged task is still running
|
||||
- (void)_checkTaskStatus
|
||||
{
|
||||
// see if task has terminated
|
||||
int mypid = waitpid([self processIdentifier], &terminationStatus, WNOHANG);
|
||||
if (mypid != 0) {
|
||||
isRunning = NO;
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:STPrivilegedTaskDidTerminateNotification object:self];
|
||||
[checkStatusTimer invalidate];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
|
||||
- (NSString *)description
|
||||
{
|
||||
NSArray *args = [self arguments];
|
||||
NSString *cmd = [[self launchPath] copy];
|
||||
|
||||
for (int i = 0; i < [args count]; i++) {
|
||||
cmd = [cmd stringByAppendingFormat:@" %@", args[i]];
|
||||
}
|
||||
|
||||
return [[super description] stringByAppendingFormat:@" %@", cmd];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
/*
|
||||
*
|
||||
* Add the Standard err Pipe and Pid support to AuthorizationExecuteWithPrivileges()
|
||||
* method
|
||||
*
|
||||
* @Author: Miklós Fazekas
|
||||
* Modified Aug 10 2010 by Sveinbjorn Thordarson
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/*static OSStatus AuthorizationExecuteWithPrivilegesStdErrAndPid (
|
||||
AuthorizationRef authorization,
|
||||
const char *pathToTool,
|
||||
AuthorizationFlags options,
|
||||
char * const *arguments,
|
||||
FILE **communicationsPipe,
|
||||
FILE **errPipe,
|
||||
pid_t* processid
|
||||
)
|
||||
{
|
||||
// get the Apple-approved secure temp directory
|
||||
NSString *tempFileTemplate = [NSTemporaryDirectory() stringByAppendingPathComponent: TMP_STDERR_TEMPLATE];
|
||||
|
||||
// copy it into a C string
|
||||
const char *tempFileTemplateCString = [tempFileTemplate fileSystemRepresentation];
|
||||
char *stderrpath = (char *)malloc(strlen(tempFileTemplateCString) + 1);
|
||||
strcpy(stderrpath, tempFileTemplateCString);
|
||||
|
||||
printf("%s\n", stderrpath);
|
||||
|
||||
// this is the command, it echoes pid and directs stderr output to pipe before running the tool w. args
|
||||
const char *commandtemplate = "echo $$; \"$@\" 2>%s";
|
||||
|
||||
if (communicationsPipe == errPipe)
|
||||
commandtemplate = "echo $$; \"$@\" 2>1";
|
||||
else if (errPipe == 0)
|
||||
commandtemplate = "echo $$; \"$@\"";
|
||||
|
||||
char command[1024];
|
||||
char **args;
|
||||
OSStatus result;
|
||||
int argcount = 0;
|
||||
int i;
|
||||
int stderrfd = 0;
|
||||
FILE *commPipe = 0;
|
||||
|
||||
// First, create temporary file for stderr
|
||||
if (errPipe)
|
||||
{
|
||||
// create temp file
|
||||
stderrfd = mkstemp(stderrpath);
|
||||
|
||||
// close and remove it
|
||||
close(stderrfd);
|
||||
unlink(stderrpath);
|
||||
|
||||
// create a pipe on the path of the temp file
|
||||
if (mkfifo(stderrpath,S_IRWXU | S_IRWXG) != 0)
|
||||
{
|
||||
fprintf(stderr,"Error mkfifo:%d\n", errno);
|
||||
return errAuthorizationInternal;
|
||||
}
|
||||
|
||||
if (stderrfd < 0)
|
||||
return errAuthorizationInternal;
|
||||
}
|
||||
|
||||
// Create command to be executed
|
||||
for (argcount = 0; arguments[argcount] != 0; ++argcount) {}
|
||||
args = (char**)malloc (sizeof(char*)*(argcount + 5));
|
||||
args[0] = "-c";
|
||||
snprintf (command, sizeof (command), commandtemplate, stderrpath);
|
||||
args[1] = command;
|
||||
args[2] = "";
|
||||
args[3] = (char*)pathToTool;
|
||||
for (i = 0; i < argcount; ++i) {
|
||||
args[i+4] = arguments[i];
|
||||
}
|
||||
args[argcount+4] = 0;
|
||||
|
||||
// for debugging: log the executed command
|
||||
printf ("Exec:\n%s", "/bin/sh"); for (i = 0; args[i] != 0; ++i) { printf (" \"%s\"", args[i]); } printf ("\n");
|
||||
|
||||
// Execute command
|
||||
result = AuthorizationExecuteWithPrivileges(authorization, "/bin/sh", options, args, &commPipe );
|
||||
if (result != noErr)
|
||||
{
|
||||
unlink (stderrpath);
|
||||
return result;
|
||||
}
|
||||
|
||||
// Read the first line of stdout => it's the pid
|
||||
{
|
||||
int stdoutfd = fileno (commPipe);
|
||||
char pidnum[1024];
|
||||
pid_t pid = 0;
|
||||
int i = 0;
|
||||
char ch = 0;
|
||||
|
||||
while ((read(stdoutfd, &ch, sizeof(ch)) == 1) && (ch != '\n') && (i < sizeof(pidnum)))
|
||||
{
|
||||
pidnum[i++] = ch;
|
||||
}
|
||||
pidnum[i] = 0;
|
||||
|
||||
if (ch != '\n')
|
||||
{
|
||||
// we shouldn't get there
|
||||
unlink (stderrpath);
|
||||
return errAuthorizationInternal;
|
||||
}
|
||||
sscanf(pidnum, "%d", &pid);
|
||||
if (processid)
|
||||
{
|
||||
*processid = pid;
|
||||
}
|
||||
NSLog(@"Have PID %d", pid);
|
||||
}
|
||||
|
||||
//
|
||||
if (errPipe) {
|
||||
stderrfd = open(stderrpath, O_RDONLY, 0);
|
||||
// *errPipe = fdopen(stderrfd, "r");
|
||||
//Now it's safe to unlink the stderr file, as the opened handle will be still valid
|
||||
unlink (stderrpath);
|
||||
} else {
|
||||
unlink(stderrpath);
|
||||
}
|
||||
|
||||
if (communicationsPipe)
|
||||
*communicationsPipe = commPipe;
|
||||
else
|
||||
fclose (commPipe);
|
||||
|
||||
NSLog(@"AuthExecNew function over");
|
||||
|
||||
return noErr;
|
||||
}*/
|
61
Pods/Sparkle/LICENSE
generated
vendored
61
Pods/Sparkle/LICENSE
generated
vendored
@ -1,61 +0,0 @@
|
||||
Copyright (c) 2006-2013 Andy Matuschak.
|
||||
Copyright (c) 2009-2013 Elgato Systems GmbH.
|
||||
Copyright (c) 2011-2014 Kornel Lesiński.
|
||||
Copyright (c) 2015-2017 Mayur Pawashe.
|
||||
Copyright (c) 2014 C.W. Betts.
|
||||
Copyright (c) 2014 Petroules Corporation.
|
||||
Copyright (c) 2014 Big Nerd Ranch.
|
||||
All rights reserved.
|
||||
|
||||
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.
|
||||
|
||||
=================
|
||||
EXTERNAL LICENSES
|
||||
=================
|
||||
|
||||
bspatch.c and bsdiff.c, from bsdiff 4.3 <http://www.daemonology.net/bsdiff/>:
|
||||
Copyright (c) 2003-2005 Colin Percival.
|
||||
|
||||
sais.c and sais.c, from sais-lite (2010/08/07) <https://sites.google.com/site/yuta256/sais>:
|
||||
Copyright (c) 2008-2010 Yuta Mori.
|
||||
|
||||
SUDSAVerifier.m:
|
||||
Copyright (c) 2011 Mark Hamlin.
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted providing 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 AUTHOR ``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 AUTHOR 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.
|
20
Pods/Sparkle/Sparkle.framework.dSYM/Contents/Info.plist
generated
vendored
20
Pods/Sparkle/Sparkle.framework.dSYM/Contents/Info.plist
generated
vendored
@ -1,20 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.apple.xcode.dsym.org.sparkle-project.Sparkle</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>dSYM</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.17.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.17.0</string>
|
||||
</dict>
|
||||
</plist>
|
BIN
Pods/Sparkle/Sparkle.framework.dSYM/Contents/Resources/DWARF/Sparkle
generated
vendored
BIN
Pods/Sparkle/Sparkle.framework.dSYM/Contents/Resources/DWARF/Sparkle
generated
vendored
Binary file not shown.
1
Pods/Sparkle/Sparkle.framework/Headers
generated
vendored
1
Pods/Sparkle/Sparkle.framework/Headers
generated
vendored
@ -1 +0,0 @@
|
||||
Versions/Current/Headers
|
1
Pods/Sparkle/Sparkle.framework/Modules
generated
vendored
1
Pods/Sparkle/Sparkle.framework/Modules
generated
vendored
@ -1 +0,0 @@
|
||||
Versions/Current/Modules
|
1
Pods/Sparkle/Sparkle.framework/PrivateHeaders
generated
vendored
1
Pods/Sparkle/Sparkle.framework/PrivateHeaders
generated
vendored
@ -1 +0,0 @@
|
||||
Versions/Current/PrivateHeaders
|
1
Pods/Sparkle/Sparkle.framework/Resources
generated
vendored
1
Pods/Sparkle/Sparkle.framework/Resources
generated
vendored
@ -1 +0,0 @@
|
||||
Versions/Current/Resources
|
1
Pods/Sparkle/Sparkle.framework/Sparkle
generated
vendored
1
Pods/Sparkle/Sparkle.framework/Sparkle
generated
vendored
@ -1 +0,0 @@
|
||||
Versions/Current/Sparkle
|
40
Pods/Sparkle/Sparkle.framework/Versions/A/Headers/SUAppcast.h
generated
vendored
40
Pods/Sparkle/Sparkle.framework/Versions/A/Headers/SUAppcast.h
generated
vendored
@ -1,40 +0,0 @@
|
||||
//
|
||||
// SUAppcast.h
|
||||
// Sparkle
|
||||
//
|
||||
// Created by Andy Matuschak on 3/12/06.
|
||||
// Copyright 2006 Andy Matuschak. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef SUAPPCAST_H
|
||||
#define SUAPPCAST_H
|
||||
|
||||
#if __has_feature(modules)
|
||||
@import Foundation;
|
||||
#else
|
||||
#import <Foundation/Foundation.h>
|
||||
#endif
|
||||
#import "SUExport.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@class SUAppcastItem;
|
||||
SU_EXPORT @interface SUAppcast : NSObject<NSURLDownloadDelegate>
|
||||
|
||||
@property (copy, nullable) NSString *userAgentString;
|
||||
|
||||
#if __has_feature(objc_generics)
|
||||
@property (copy, nullable) NSDictionary<NSString *, NSString *> *httpHeaders;
|
||||
#else
|
||||
@property (copy, nullable) NSDictionary *httpHeaders;
|
||||
#endif
|
||||
|
||||
- (void)fetchAppcastFromURL:(NSURL *)url inBackground:(BOOL)bg completionBlock:(void (^)(NSError *_Nullable))err;
|
||||
- (SUAppcast *)copyWithoutDeltaUpdates;
|
||||
|
||||
@property (readonly, copy, nullable) NSArray *items;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
#endif
|
49
Pods/Sparkle/Sparkle.framework/Versions/A/Headers/SUAppcastItem.h
generated
vendored
49
Pods/Sparkle/Sparkle.framework/Versions/A/Headers/SUAppcastItem.h
generated
vendored
@ -1,49 +0,0 @@
|
||||
//
|
||||
// SUAppcastItem.h
|
||||
// Sparkle
|
||||
//
|
||||
// Created by Andy Matuschak on 3/12/06.
|
||||
// Copyright 2006 Andy Matuschak. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef SUAPPCASTITEM_H
|
||||
#define SUAPPCASTITEM_H
|
||||
|
||||
#if __has_feature(modules)
|
||||
@import Foundation;
|
||||
#else
|
||||
#import <Foundation/Foundation.h>
|
||||
#endif
|
||||
#import "SUExport.h"
|
||||
|
||||
SU_EXPORT @interface SUAppcastItem : NSObject
|
||||
@property (copy, readonly) NSString *title;
|
||||
@property (copy, readonly) NSString *dateString;
|
||||
@property (copy, readonly) NSString *itemDescription;
|
||||
@property (strong, readonly) NSURL *releaseNotesURL;
|
||||
@property (copy, readonly) NSString *DSASignature;
|
||||
@property (copy, readonly) NSString *minimumSystemVersion;
|
||||
@property (copy, readonly) NSString *maximumSystemVersion;
|
||||
@property (strong, readonly) NSURL *fileURL;
|
||||
@property (nonatomic, readonly) uint64_t contentLength;
|
||||
@property (copy, readonly) NSString *versionString;
|
||||
@property (copy, readonly) NSString *displayVersionString;
|
||||
@property (copy, readonly) NSDictionary *deltaUpdates;
|
||||
@property (strong, readonly) NSURL *infoURL;
|
||||
|
||||
// Initializes with data from a dictionary provided by the RSS class.
|
||||
- (instancetype)initWithDictionary:(NSDictionary *)dict;
|
||||
- (instancetype)initWithDictionary:(NSDictionary *)dict failureReason:(NSString **)error;
|
||||
|
||||
@property (getter=isDeltaUpdate, readonly) BOOL deltaUpdate;
|
||||
@property (getter=isCriticalUpdate, readonly) BOOL criticalUpdate;
|
||||
@property (getter=isInformationOnlyUpdate, readonly) BOOL informationOnlyUpdate;
|
||||
|
||||
// Returns the dictionary provided in initWithDictionary; this might be useful later for extensions.
|
||||
@property (readonly, copy) NSDictionary *propertiesDictionary;
|
||||
|
||||
- (NSURL *)infoURL;
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
53
Pods/Sparkle/Sparkle.framework/Versions/A/Headers/SUErrors.h
generated
vendored
53
Pods/Sparkle/Sparkle.framework/Versions/A/Headers/SUErrors.h
generated
vendored
@ -1,53 +0,0 @@
|
||||
//
|
||||
// SUErrors.h
|
||||
// Sparkle
|
||||
//
|
||||
// Created by C.W. Betts on 10/13/14.
|
||||
// Copyright (c) 2014 Sparkle Project. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef SUERRORS_H
|
||||
#define SUERRORS_H
|
||||
|
||||
#if __has_feature(modules)
|
||||
@import Foundation;
|
||||
#else
|
||||
#import <Foundation/Foundation.h>
|
||||
#endif
|
||||
#import "SUExport.h"
|
||||
|
||||
/**
|
||||
* Error domain used by Sparkle
|
||||
*/
|
||||
SU_EXPORT extern NSString *const SUSparkleErrorDomain;
|
||||
|
||||
typedef NS_ENUM(OSStatus, SUError) {
|
||||
// Appcast phase errors.
|
||||
SUAppcastParseError = 1000,
|
||||
SUNoUpdateError = 1001,
|
||||
SUAppcastError = 1002,
|
||||
SURunningFromDiskImageError = 1003,
|
||||
|
||||
// Download phase errors.
|
||||
SUTemporaryDirectoryError = 2000,
|
||||
SUDownloadError = 2001,
|
||||
|
||||
// Extraction phase errors.
|
||||
SUUnarchivingError = 3000,
|
||||
SUSignatureError = 3001,
|
||||
|
||||
// Installation phase errors.
|
||||
SUFileCopyFailure = 4000,
|
||||
SUAuthenticationFailure = 4001,
|
||||
SUMissingUpdateError = 4002,
|
||||
SUMissingInstallerToolError = 4003,
|
||||
SURelaunchError = 4004,
|
||||
SUInstallationError = 4005,
|
||||
SUDowngradeError = 4006,
|
||||
SUInstallationCancelledError = 4007,
|
||||
|
||||
// System phase errors
|
||||
SUSystemPowerOffError = 5000
|
||||
};
|
||||
|
||||
#endif
|
18
Pods/Sparkle/Sparkle.framework/Versions/A/Headers/SUExport.h
generated
vendored
18
Pods/Sparkle/Sparkle.framework/Versions/A/Headers/SUExport.h
generated
vendored
@ -1,18 +0,0 @@
|
||||
//
|
||||
// SUExport.h
|
||||
// Sparkle
|
||||
//
|
||||
// Created by Jake Petroules on 2014-08-23.
|
||||
// Copyright (c) 2014 Sparkle Project. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef SUEXPORT_H
|
||||
#define SUEXPORT_H
|
||||
|
||||
#ifdef BUILDING_SPARKLE
|
||||
#define SU_EXPORT __attribute__((visibility("default")))
|
||||
#else
|
||||
#define SU_EXPORT
|
||||
#endif
|
||||
|
||||
#endif
|
52
Pods/Sparkle/Sparkle.framework/Versions/A/Headers/SUStandardVersionComparator.h
generated
vendored
52
Pods/Sparkle/Sparkle.framework/Versions/A/Headers/SUStandardVersionComparator.h
generated
vendored
@ -1,52 +0,0 @@
|
||||
//
|
||||
// SUStandardVersionComparator.h
|
||||
// Sparkle
|
||||
//
|
||||
// Created by Andy Matuschak on 12/21/07.
|
||||
// Copyright 2007 Andy Matuschak. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef SUSTANDARDVERSIONCOMPARATOR_H
|
||||
#define SUSTANDARDVERSIONCOMPARATOR_H
|
||||
|
||||
#if __has_feature(modules)
|
||||
@import Foundation;
|
||||
#else
|
||||
#import <Foundation/Foundation.h>
|
||||
#endif
|
||||
#import "SUExport.h"
|
||||
#import "SUVersionComparisonProtocol.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/*!
|
||||
Sparkle's default version comparator.
|
||||
|
||||
This comparator is adapted from MacPAD, by Kevin Ballard.
|
||||
It's "dumb" in that it does essentially string comparison,
|
||||
in components split by character type.
|
||||
*/
|
||||
SU_EXPORT @interface SUStandardVersionComparator : NSObject <SUVersionComparison>
|
||||
|
||||
/*!
|
||||
Initializes a new instance of the standard version comparator.
|
||||
*/
|
||||
- (instancetype)init;
|
||||
|
||||
/*!
|
||||
Returns a singleton instance of the comparator.
|
||||
|
||||
It is usually preferred to alloc/init new a comparator instead.
|
||||
*/
|
||||
+ (SUStandardVersionComparator *)defaultComparator;
|
||||
|
||||
/*!
|
||||
Compares version strings through textual analysis.
|
||||
|
||||
See the implementation for more details.
|
||||
*/
|
||||
- (NSComparisonResult)compareVersion:(NSString *)versionA toVersion:(NSString *)versionB;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
#endif
|
220
Pods/Sparkle/Sparkle.framework/Versions/A/Headers/SUUpdater.h
generated
vendored
220
Pods/Sparkle/Sparkle.framework/Versions/A/Headers/SUUpdater.h
generated
vendored
@ -1,220 +0,0 @@
|
||||
//
|
||||
// SUUpdater.h
|
||||
// Sparkle
|
||||
//
|
||||
// Created by Andy Matuschak on 1/4/06.
|
||||
// Copyright 2006 Andy Matuschak. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef SUUPDATER_H
|
||||
#define SUUPDATER_H
|
||||
|
||||
#if __has_feature(modules)
|
||||
@import Cocoa;
|
||||
#else
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#endif
|
||||
#import "SUExport.h"
|
||||
#import "SUVersionComparisonProtocol.h"
|
||||
#import "SUVersionDisplayProtocol.h"
|
||||
|
||||
@class SUAppcastItem, SUAppcast;
|
||||
|
||||
@protocol SUUpdaterDelegate;
|
||||
|
||||
/*!
|
||||
The main API in Sparkle for controlling the update mechanism.
|
||||
|
||||
This class is used to configure the update paramters as well as manually
|
||||
and automatically schedule and control checks for updates.
|
||||
*/
|
||||
SU_EXPORT @interface SUUpdater : NSObject
|
||||
|
||||
@property (unsafe_unretained) IBOutlet id<SUUpdaterDelegate> delegate;
|
||||
|
||||
/*!
|
||||
The shared updater for the main bundle.
|
||||
|
||||
This is equivalent to passing [NSBundle mainBundle] to SUUpdater::updaterForBundle:
|
||||
*/
|
||||
+ (SUUpdater *)sharedUpdater;
|
||||
|
||||
/*!
|
||||
The shared updater for a specified bundle.
|
||||
|
||||
If an updater has already been initialized for the provided bundle, that shared instance will be returned.
|
||||
*/
|
||||
+ (SUUpdater *)updaterForBundle:(NSBundle *)bundle;
|
||||
|
||||
/*!
|
||||
Designated initializer for SUUpdater.
|
||||
|
||||
If an updater has already been initialized for the provided bundle, that shared instance will be returned.
|
||||
*/
|
||||
- (instancetype)initForBundle:(NSBundle *)bundle;
|
||||
|
||||
/*!
|
||||
Explicitly checks for updates and displays a progress dialog while doing so.
|
||||
|
||||
This method is meant for a main menu item.
|
||||
Connect any menu item to this action in Interface Builder,
|
||||
and Sparkle will check for updates and report back its findings verbosely
|
||||
when it is invoked.
|
||||
|
||||
This will find updates that the user has opted into skipping.
|
||||
*/
|
||||
- (IBAction)checkForUpdates:(id)sender;
|
||||
|
||||
/*!
|
||||
The menu item validation used for the -checkForUpdates: action
|
||||
*/
|
||||
- (BOOL)validateMenuItem:(NSMenuItem *)menuItem;
|
||||
|
||||
/*!
|
||||
Checks for updates, but does not display any UI unless an update is found.
|
||||
|
||||
This is meant for programmatically initating a check for updates. That is,
|
||||
it will display no UI unless it actually finds an update, in which case it
|
||||
proceeds as usual.
|
||||
|
||||
If automatic downloading of updates it turned on and allowed, however,
|
||||
this will invoke that behavior, and if an update is found, it will be downloaded
|
||||
in the background silently and will be prepped for installation.
|
||||
|
||||
This will not find updates that the user has opted into skipping.
|
||||
*/
|
||||
- (void)checkForUpdatesInBackground;
|
||||
|
||||
/*!
|
||||
A property indicating whether or not to check for updates automatically.
|
||||
|
||||
Setting this property will persist in the host bundle's user defaults.
|
||||
The update schedule cycle will be reset in a short delay after the property's new value is set.
|
||||
This is to allow reverting this property without kicking off a schedule change immediately
|
||||
*/
|
||||
@property BOOL automaticallyChecksForUpdates;
|
||||
|
||||
/*!
|
||||
A property indicating whether or not updates can be automatically downloaded in the background.
|
||||
|
||||
Note that automatic downloading of updates can be disallowed by the developer
|
||||
or by the user's system if silent updates cannot be done (eg: if they require authentication).
|
||||
In this case, -automaticallyDownloadsUpdates will return NO regardless of how this property is set.
|
||||
|
||||
Setting this property will persist in the host bundle's user defaults.
|
||||
*/
|
||||
@property BOOL automaticallyDownloadsUpdates;
|
||||
|
||||
/*!
|
||||
A property indicating the current automatic update check interval.
|
||||
|
||||
Setting this property will persist in the host bundle's user defaults.
|
||||
The update schedule cycle will be reset in a short delay after the property's new value is set.
|
||||
This is to allow reverting this property without kicking off a schedule change immediately
|
||||
*/
|
||||
@property NSTimeInterval updateCheckInterval;
|
||||
|
||||
/*!
|
||||
Begins a "probing" check for updates which will not actually offer to
|
||||
update to that version.
|
||||
|
||||
However, the delegate methods
|
||||
SUUpdaterDelegate::updater:didFindValidUpdate: and
|
||||
SUUpdaterDelegate::updaterDidNotFindUpdate: will be called,
|
||||
so you can use that information in your UI.
|
||||
|
||||
Updates that have been skipped by the user will not be found.
|
||||
*/
|
||||
- (void)checkForUpdateInformation;
|
||||
|
||||
/*!
|
||||
The URL of the appcast used to download update information.
|
||||
|
||||
Setting this property will persist in the host bundle's user defaults.
|
||||
If you don't want persistence, you may want to consider instead implementing
|
||||
SUUpdaterDelegate::feedURLStringForUpdater: or SUUpdaterDelegate::feedParametersForUpdater:sendingSystemProfile:
|
||||
|
||||
This property must be called on the main thread.
|
||||
*/
|
||||
@property (copy) NSURL *feedURL;
|
||||
|
||||
/*!
|
||||
The host bundle that is being updated.
|
||||
*/
|
||||
@property (readonly, strong) NSBundle *hostBundle;
|
||||
|
||||
/*!
|
||||
The bundle this class (SUUpdater) is loaded into.
|
||||
*/
|
||||
@property (strong, readonly) NSBundle *sparkleBundle;
|
||||
|
||||
/*!
|
||||
The user agent used when checking for updates.
|
||||
|
||||
The default implementation can be overrided.
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *userAgentString;
|
||||
|
||||
/*!
|
||||
The HTTP headers used when checking for updates.
|
||||
|
||||
The keys of this dictionary are HTTP header fields (NSString) and values are corresponding values (NSString)
|
||||
*/
|
||||
#if __has_feature(objc_generics)
|
||||
@property (copy) NSDictionary<NSString *, NSString *> *httpHeaders;
|
||||
#else
|
||||
@property (copy) NSDictionary *httpHeaders;
|
||||
#endif
|
||||
|
||||
/*!
|
||||
A property indicating whether or not the user's system profile information is sent when checking for updates.
|
||||
|
||||
Setting this property will persist in the host bundle's user defaults.
|
||||
*/
|
||||
@property BOOL sendsSystemProfile;
|
||||
|
||||
/*!
|
||||
A property indicating the decryption password used for extracting updates shipped as Apple Disk Images (dmg)
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *decryptionPassword;
|
||||
|
||||
/*!
|
||||
Checks for updates and, if available, immediately downloads and installs them.
|
||||
A progress dialog is shown but the user will never be prompted to read the
|
||||
release notes.
|
||||
|
||||
You may want to respond to the userDidCancelDownload delegate method in case
|
||||
the user clicks the "Cancel" button while the update is downloading.
|
||||
|
||||
If you are writing a UI-less background application, you probably want to instead use
|
||||
SUUpdaterDelegate::updater:willInstallUpdateOnQuit:immediateInstallationInvocation:
|
||||
*/
|
||||
- (void)installUpdatesIfAvailable;
|
||||
|
||||
/*!
|
||||
Returns the date of last update check.
|
||||
|
||||
\returns \c nil if no check has been performed.
|
||||
*/
|
||||
@property (readonly, copy) NSDate *lastUpdateCheckDate;
|
||||
|
||||
/*!
|
||||
Appropriately schedules or cancels the update checking timer according to
|
||||
the preferences for time interval and automatic checks.
|
||||
|
||||
This call does not change the date of the next check,
|
||||
but only the internal NSTimer.
|
||||
*/
|
||||
- (void)resetUpdateCycle;
|
||||
|
||||
/*!
|
||||
A property indicating whether or not an update is in progress.
|
||||
|
||||
Note this property is not indicative of whether or not user initiated updates can be performed.
|
||||
Use SUUpdater::validateMenuItem: for that instead.
|
||||
*/
|
||||
@property (readonly) BOOL updateInProgress;
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
274
Pods/Sparkle/Sparkle.framework/Versions/A/Headers/SUUpdaterDelegate.h
generated
vendored
274
Pods/Sparkle/Sparkle.framework/Versions/A/Headers/SUUpdaterDelegate.h
generated
vendored
@ -1,274 +0,0 @@
|
||||
//
|
||||
// SUUpdaterDelegate.h
|
||||
// Sparkle
|
||||
//
|
||||
// Created by Mayur Pawashe on 12/25/16.
|
||||
// Copyright © 2016 Sparkle Project. All rights reserved.
|
||||
//
|
||||
|
||||
#if __has_feature(modules)
|
||||
@import Foundation;
|
||||
#else
|
||||
#import <Foundation/Foundation.h>
|
||||
#endif
|
||||
|
||||
#import "SUExport.h"
|
||||
|
||||
@protocol SUVersionComparison, SUVersionDisplay;
|
||||
@class SUUpdater, SUAppcast, SUAppcastItem;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// SUUpdater Notifications for events that might be interesting to more than just the delegate
|
||||
// The updater will be the notification object
|
||||
// -----------------------------------------------------------------------------
|
||||
SU_EXPORT extern NSString *const SUUpdaterDidFinishLoadingAppCastNotification;
|
||||
SU_EXPORT extern NSString *const SUUpdaterDidFindValidUpdateNotification;
|
||||
SU_EXPORT extern NSString *const SUUpdaterDidNotFindUpdateNotification;
|
||||
SU_EXPORT extern NSString *const SUUpdaterWillRestartNotification;
|
||||
#define SUUpdaterWillRelaunchApplicationNotification SUUpdaterWillRestartNotification;
|
||||
#define SUUpdaterWillInstallUpdateNotification SUUpdaterWillRestartNotification;
|
||||
|
||||
// Key for the SUAppcastItem object in the SUUpdaterDidFindValidUpdateNotification userInfo
|
||||
SU_EXPORT extern NSString *const SUUpdaterAppcastItemNotificationKey;
|
||||
// Key for the SUAppcast object in the SUUpdaterDidFinishLoadingAppCastNotification userInfo
|
||||
SU_EXPORT extern NSString *const SUUpdaterAppcastNotificationKey;
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// SUUpdater Delegate:
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
/*!
|
||||
Provides methods to control the behavior of an SUUpdater object.
|
||||
*/
|
||||
@protocol SUUpdaterDelegate <NSObject>
|
||||
@optional
|
||||
|
||||
/*!
|
||||
Returns whether to allow Sparkle to pop up.
|
||||
|
||||
For example, this may be used to prevent Sparkle from interrupting a setup assistant.
|
||||
|
||||
\param updater The SUUpdater instance.
|
||||
*/
|
||||
- (BOOL)updaterMayCheckForUpdates:(SUUpdater *)updater;
|
||||
|
||||
/*!
|
||||
Returns additional parameters to append to the appcast URL's query string.
|
||||
|
||||
This is potentially based on whether or not Sparkle will also be sending along the system profile.
|
||||
|
||||
\param updater The SUUpdater instance.
|
||||
\param sendingProfile Whether the system profile will also be sent.
|
||||
|
||||
\return An array of dictionaries with keys: "key", "value", "displayKey", "displayValue", the latter two being specifically for display to the user.
|
||||
*/
|
||||
#if __has_feature(objc_generics)
|
||||
- (NSArray<NSDictionary<NSString *, NSString *> *> *)feedParametersForUpdater:(SUUpdater *)updater sendingSystemProfile:(BOOL)sendingProfile;
|
||||
#else
|
||||
- (NSArray *)feedParametersForUpdater:(SUUpdater *)updater sendingSystemProfile:(BOOL)sendingProfile;
|
||||
#endif
|
||||
|
||||
/*!
|
||||
Returns a custom appcast URL.
|
||||
|
||||
Override this to dynamically specify the entire URL.
|
||||
|
||||
An alternative may be to use SUUpdaterDelegate::feedParametersForUpdater:sendingSystemProfile:
|
||||
and let the server handle what kind of feed to provide.
|
||||
|
||||
\param updater The SUUpdater instance.
|
||||
*/
|
||||
- (nullable NSString *)feedURLStringForUpdater:(SUUpdater *)updater;
|
||||
|
||||
/*!
|
||||
Returns whether Sparkle should prompt the user about automatic update checks.
|
||||
|
||||
Use this to override the default behavior.
|
||||
|
||||
\param updater The SUUpdater instance.
|
||||
*/
|
||||
- (BOOL)updaterShouldPromptForPermissionToCheckForUpdates:(SUUpdater *)updater;
|
||||
|
||||
/*!
|
||||
Called after Sparkle has downloaded the appcast from the remote server.
|
||||
|
||||
Implement this if you want to do some special handling with the appcast once it finishes loading.
|
||||
|
||||
\param updater The SUUpdater instance.
|
||||
\param appcast The appcast that was downloaded from the remote server.
|
||||
*/
|
||||
- (void)updater:(SUUpdater *)updater didFinishLoadingAppcast:(SUAppcast *)appcast;
|
||||
|
||||
/*!
|
||||
Returns the item in the appcast corresponding to the update that should be installed.
|
||||
|
||||
If you're using special logic or extensions in your appcast,
|
||||
implement this to use your own logic for finding a valid update, if any,
|
||||
in the given appcast.
|
||||
|
||||
\param appcast The appcast that was downloaded from the remote server.
|
||||
\param updater The SUUpdater instance.
|
||||
*/
|
||||
- (nullable SUAppcastItem *)bestValidUpdateInAppcast:(SUAppcast *)appcast forUpdater:(SUUpdater *)updater;
|
||||
|
||||
/*!
|
||||
Called when a valid update is found by the update driver.
|
||||
|
||||
\param updater The SUUpdater instance.
|
||||
\param item The appcast item corresponding to the update that is proposed to be installed.
|
||||
*/
|
||||
- (void)updater:(SUUpdater *)updater didFindValidUpdate:(SUAppcastItem *)item;
|
||||
|
||||
/*!
|
||||
Called when a valid update is not found.
|
||||
|
||||
\param updater The SUUpdater instance.
|
||||
*/
|
||||
- (void)updaterDidNotFindUpdate:(SUUpdater *)updater;
|
||||
|
||||
/*!
|
||||
Called immediately before downloading the specified update.
|
||||
|
||||
\param updater The SUUpdater instance.
|
||||
\param item The appcast item corresponding to the update that is proposed to be downloaded.
|
||||
\param request The mutable URL request that will be used to download the update.
|
||||
*/
|
||||
- (void)updater:(SUUpdater *)updater willDownloadUpdate:(SUAppcastItem *)item withRequest:(NSMutableURLRequest *)request;
|
||||
|
||||
/*!
|
||||
Called after the specified update failed to download.
|
||||
|
||||
\param updater The SUUpdater instance.
|
||||
\param item The appcast item corresponding to the update that failed to download.
|
||||
\param error The error generated by the failed download.
|
||||
*/
|
||||
- (void)updater:(SUUpdater *)updater failedToDownloadUpdate:(SUAppcastItem *)item error:(NSError *)error;
|
||||
|
||||
/*!
|
||||
Called when the user clicks the cancel button while and update is being downloaded.
|
||||
|
||||
\param updater The SUUpdater instance.
|
||||
*/
|
||||
- (void)userDidCancelDownload:(SUUpdater *)updater;
|
||||
|
||||
/*!
|
||||
Called immediately before installing the specified update.
|
||||
|
||||
\param updater The SUUpdater instance.
|
||||
\param item The appcast item corresponding to the update that is proposed to be installed.
|
||||
*/
|
||||
- (void)updater:(SUUpdater *)updater willInstallUpdate:(SUAppcastItem *)item;
|
||||
|
||||
/*!
|
||||
Returns whether the relaunch should be delayed in order to perform other tasks.
|
||||
|
||||
This is not called if the user didn't relaunch on the previous update,
|
||||
in that case it will immediately restart.
|
||||
|
||||
\param updater The SUUpdater instance.
|
||||
\param item The appcast item corresponding to the update that is proposed to be installed.
|
||||
\param invocation The invocation that must be completed with `[invocation invoke]` before continuing with the relaunch.
|
||||
|
||||
\return \c YES to delay the relaunch until \p invocation is invoked.
|
||||
*/
|
||||
- (BOOL)updater:(SUUpdater *)updater shouldPostponeRelaunchForUpdate:(SUAppcastItem *)item untilInvoking:(NSInvocation *)invocation;
|
||||
|
||||
/*!
|
||||
Returns whether the application should be relaunched at all.
|
||||
|
||||
Some apps \b cannot be relaunched under certain circumstances.
|
||||
This method can be used to explicitly prevent a relaunch.
|
||||
|
||||
\param updater The SUUpdater instance.
|
||||
*/
|
||||
- (BOOL)updaterShouldRelaunchApplication:(SUUpdater *)updater;
|
||||
|
||||
/*!
|
||||
Called immediately before relaunching.
|
||||
|
||||
\param updater The SUUpdater instance.
|
||||
*/
|
||||
- (void)updaterWillRelaunchApplication:(SUUpdater *)updater;
|
||||
|
||||
/*!
|
||||
Returns an object that compares version numbers to determine their arithmetic relation to each other.
|
||||
|
||||
This method allows you to provide a custom version comparator.
|
||||
If you don't implement this method or return \c nil,
|
||||
the standard version comparator will be used.
|
||||
|
||||
\sa SUStandardVersionComparator
|
||||
|
||||
\param updater The SUUpdater instance.
|
||||
*/
|
||||
- (nullable id<SUVersionComparison>)versionComparatorForUpdater:(SUUpdater *)updater;
|
||||
|
||||
/*!
|
||||
Returns an object that formats version numbers for display to the user.
|
||||
|
||||
If you don't implement this method or return \c nil,
|
||||
the standard version formatter will be used.
|
||||
|
||||
\sa SUUpdateAlert
|
||||
|
||||
\param updater The SUUpdater instance.
|
||||
*/
|
||||
- (nullable id<SUVersionDisplay>)versionDisplayerForUpdater:(SUUpdater *)updater;
|
||||
|
||||
/*!
|
||||
Returns the path which is used to relaunch the client after the update is installed.
|
||||
|
||||
The default is the path of the host bundle.
|
||||
|
||||
\param updater The SUUpdater instance.
|
||||
*/
|
||||
- (nullable NSString *)pathToRelaunchForUpdater:(SUUpdater *)updater;
|
||||
|
||||
/*!
|
||||
Called before an updater shows a modal alert window,
|
||||
to give the host the opportunity to hide attached windows that may get in the way.
|
||||
|
||||
\param updater The SUUpdater instance.
|
||||
*/
|
||||
- (void)updaterWillShowModalAlert:(SUUpdater *)updater;
|
||||
|
||||
/*!
|
||||
Called after an updater shows a modal alert window,
|
||||
to give the host the opportunity to hide attached windows that may get in the way.
|
||||
|
||||
\param updater The SUUpdater instance.
|
||||
*/
|
||||
- (void)updaterDidShowModalAlert:(SUUpdater *)updater;
|
||||
|
||||
/*!
|
||||
Called when an update is scheduled to be silently installed on quit.
|
||||
This is after an update has been automatically downloaded in the background.
|
||||
(i.e. SUUpdater::automaticallyDownloadsUpdates is YES)
|
||||
|
||||
\param updater The SUUpdater instance.
|
||||
\param item The appcast item corresponding to the update that is proposed to be installed.
|
||||
\param invocation Can be used to trigger an immediate silent install and relaunch.
|
||||
*/
|
||||
- (void)updater:(SUUpdater *)updater willInstallUpdateOnQuit:(SUAppcastItem *)item immediateInstallationInvocation:(NSInvocation *)invocation;
|
||||
|
||||
/*!
|
||||
Calls after an update that was scheduled to be silently installed on quit has been canceled.
|
||||
|
||||
\param updater The SUUpdater instance.
|
||||
\param item The appcast item corresponding to the update that was proposed to be installed.
|
||||
*/
|
||||
- (void)updater:(SUUpdater *)updater didCancelInstallUpdateOnQuit:(SUAppcastItem *)item;
|
||||
|
||||
/*!
|
||||
Called after an update is aborted due to an error.
|
||||
|
||||
\param updater The SUUpdater instance.
|
||||
\param error The error that caused the abort
|
||||
*/
|
||||
- (void)updater:(SUUpdater *)updater didAbortWithError:(NSError *)error;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
37
Pods/Sparkle/Sparkle.framework/Versions/A/Headers/SUVersionComparisonProtocol.h
generated
vendored
37
Pods/Sparkle/Sparkle.framework/Versions/A/Headers/SUVersionComparisonProtocol.h
generated
vendored
@ -1,37 +0,0 @@
|
||||
//
|
||||
// SUVersionComparisonProtocol.h
|
||||
// Sparkle
|
||||
//
|
||||
// Created by Andy Matuschak on 12/21/07.
|
||||
// Copyright 2007 Andy Matuschak. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef SUVERSIONCOMPARISONPROTOCOL_H
|
||||
#define SUVERSIONCOMPARISONPROTOCOL_H
|
||||
|
||||
#if __has_feature(modules)
|
||||
@import Foundation;
|
||||
#else
|
||||
#import <Foundation/Foundation.h>
|
||||
#endif
|
||||
#import "SUExport.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/*!
|
||||
Provides version comparison facilities for Sparkle.
|
||||
*/
|
||||
@protocol SUVersionComparison
|
||||
|
||||
/*!
|
||||
An abstract method to compare two version strings.
|
||||
|
||||
Should return NSOrderedAscending if b > a, NSOrderedDescending if b < a,
|
||||
and NSOrderedSame if they are equivalent.
|
||||
*/
|
||||
- (NSComparisonResult)compareVersion:(NSString *)versionA toVersion:(NSString *)versionB; // *** MAY BE CALLED ON NON-MAIN THREAD!
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
#endif
|
29
Pods/Sparkle/Sparkle.framework/Versions/A/Headers/SUVersionDisplayProtocol.h
generated
vendored
29
Pods/Sparkle/Sparkle.framework/Versions/A/Headers/SUVersionDisplayProtocol.h
generated
vendored
@ -1,29 +0,0 @@
|
||||
//
|
||||
// SUVersionDisplayProtocol.h
|
||||
// EyeTV
|
||||
//
|
||||
// Created by Uli Kusterer on 08.12.09.
|
||||
// Copyright 2009 Elgato Systems GmbH. All rights reserved.
|
||||
//
|
||||
|
||||
#if __has_feature(modules)
|
||||
@import Foundation;
|
||||
#else
|
||||
#import <Foundation/Foundation.h>
|
||||
#endif
|
||||
#import "SUExport.h"
|
||||
|
||||
/*!
|
||||
Applies special display formatting to version numbers.
|
||||
*/
|
||||
@protocol SUVersionDisplay
|
||||
|
||||
/*!
|
||||
Formats two version strings.
|
||||
|
||||
Both versions are provided so that important distinguishing information
|
||||
can be displayed while also leaving out unnecessary/confusing parts.
|
||||
*/
|
||||
- (void)formatVersion:(NSString *_Nonnull*_Nonnull)inOutVersionA andVersion:(NSString *_Nonnull*_Nonnull)inOutVersionB;
|
||||
|
||||
@end
|
24
Pods/Sparkle/Sparkle.framework/Versions/A/Headers/Sparkle.h
generated
vendored
24
Pods/Sparkle/Sparkle.framework/Versions/A/Headers/Sparkle.h
generated
vendored
@ -1,24 +0,0 @@
|
||||
//
|
||||
// Sparkle.h
|
||||
// Sparkle
|
||||
//
|
||||
// Created by Andy Matuschak on 3/16/06. (Modified by CDHW on 23/12/07)
|
||||
// Copyright 2006 Andy Matuschak. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef SPARKLE_H
|
||||
#define SPARKLE_H
|
||||
|
||||
// This list should include the shared headers. It doesn't matter if some of them aren't shared (unless
|
||||
// there are name-space collisions) so we can list all of them to start with:
|
||||
|
||||
#import "SUAppcast.h"
|
||||
#import "SUAppcastItem.h"
|
||||
#import "SUStandardVersionComparator.h"
|
||||
#import "SUUpdater.h"
|
||||
#import "SUUpdaterDelegate.h"
|
||||
#import "SUVersionComparisonProtocol.h"
|
||||
#import "SUVersionDisplayProtocol.h"
|
||||
#import "SUErrors.h"
|
||||
|
||||
#endif
|
6
Pods/Sparkle/Sparkle.framework/Versions/A/Modules/module.modulemap
generated
vendored
6
Pods/Sparkle/Sparkle.framework/Versions/A/Modules/module.modulemap
generated
vendored
@ -1,6 +0,0 @@
|
||||
framework module Sparkle {
|
||||
umbrella header "Sparkle.h"
|
||||
|
||||
export *
|
||||
module * { export * }
|
||||
}
|
21
Pods/Sparkle/Sparkle.framework/Versions/A/PrivateHeaders/SUUnarchiver.h
generated
vendored
21
Pods/Sparkle/Sparkle.framework/Versions/A/PrivateHeaders/SUUnarchiver.h
generated
vendored
@ -1,21 +0,0 @@
|
||||
//
|
||||
// SUUnarchiver.h
|
||||
// Sparkle
|
||||
//
|
||||
// Created by Andy Matuschak on 3/16/06.
|
||||
// Copyright 2006 Andy Matuschak. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol SUUnarchiverProtocol;
|
||||
|
||||
@interface SUUnarchiver : NSObject
|
||||
|
||||
+ (nullable id <SUUnarchiverProtocol>)unarchiverForPath:(NSString *)path updatingHostBundlePath:(nullable NSString *)hostPath decryptionPassword:(nullable NSString *)decryptionPassword;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
54
Pods/Sparkle/Sparkle.framework/Versions/A/Resources/Autoupdate.app/Contents/Info.plist
generated
vendored
54
Pods/Sparkle/Sparkle.framework/Versions/A/Resources/Autoupdate.app/Contents/Info.plist
generated
vendored
@ -1,54 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>BuildMachineOSBuild</key>
|
||||
<string>16E175b</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>Autoupdate</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>AppIcon.icns</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.sparkle-project.Sparkle.Autoupdate</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.17.0 12-g72ee4aa2</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleSupportedPlatforms</key>
|
||||
<array>
|
||||
<string>MacOSX</string>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.17.0</string>
|
||||
<key>DTCompiler</key>
|
||||
<string>com.apple.compilers.llvm.clang.1_0</string>
|
||||
<key>DTPlatformBuild</key>
|
||||
<string>8W120l</string>
|
||||
<key>DTPlatformVersion</key>
|
||||
<string>GM</string>
|
||||
<key>DTSDKBuild</key>
|
||||
<string>16E153d</string>
|
||||
<key>DTSDKName</key>
|
||||
<string>macosx10.12</string>
|
||||
<key>DTXcode</key>
|
||||
<string>0830</string>
|
||||
<key>DTXcodeBuild</key>
|
||||
<string>8W120l</string>
|
||||
<key>LSBackgroundOnly</key>
|
||||
<string>1</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>10.7</string>
|
||||
<key>LSUIElement</key>
|
||||
<string>1</string>
|
||||
<key>NSMainNibFile</key>
|
||||
<string>MainMenu</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
</dict>
|
||||
</plist>
|
BIN
Pods/Sparkle/Sparkle.framework/Versions/A/Resources/Autoupdate.app/Contents/MacOS/Autoupdate
generated
vendored
BIN
Pods/Sparkle/Sparkle.framework/Versions/A/Resources/Autoupdate.app/Contents/MacOS/Autoupdate
generated
vendored
Binary file not shown.
BIN
Pods/Sparkle/Sparkle.framework/Versions/A/Resources/Autoupdate.app/Contents/MacOS/fileop
generated
vendored
BIN
Pods/Sparkle/Sparkle.framework/Versions/A/Resources/Autoupdate.app/Contents/MacOS/fileop
generated
vendored
Binary file not shown.
1
Pods/Sparkle/Sparkle.framework/Versions/A/Resources/Autoupdate.app/Contents/PkgInfo
generated
vendored
1
Pods/Sparkle/Sparkle.framework/Versions/A/Resources/Autoupdate.app/Contents/PkgInfo
generated
vendored
@ -1 +0,0 @@
|
||||
APPL????
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
44
Pods/Sparkle/Sparkle.framework/Versions/A/Resources/Info.plist
generated
vendored
44
Pods/Sparkle/Sparkle.framework/Versions/A/Resources/Info.plist
generated
vendored
@ -1,44 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>BuildMachineOSBuild</key>
|
||||
<string>16E175b</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>Sparkle</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.sparkle-project.Sparkle</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>Sparkle</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.17.0 12-g72ee4aa2</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleSupportedPlatforms</key>
|
||||
<array>
|
||||
<string>MacOSX</string>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.17.0</string>
|
||||
<key>DTCompiler</key>
|
||||
<string>com.apple.compilers.llvm.clang.1_0</string>
|
||||
<key>DTPlatformBuild</key>
|
||||
<string>8W120l</string>
|
||||
<key>DTPlatformVersion</key>
|
||||
<string>GM</string>
|
||||
<key>DTSDKBuild</key>
|
||||
<string>16E153d</string>
|
||||
<key>DTSDKName</key>
|
||||
<string>macosx10.12</string>
|
||||
<key>DTXcode</key>
|
||||
<string>0830</string>
|
||||
<key>DTXcodeBuild</key>
|
||||
<string>8W120l</string>
|
||||
</dict>
|
||||
</plist>
|
314
Pods/Sparkle/Sparkle.framework/Versions/A/Resources/SUModelTranslation.plist
generated
vendored
314
Pods/Sparkle/Sparkle.framework/Versions/A/Resources/SUModelTranslation.plist
generated
vendored
@ -1,314 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>ADP2,1</key>
|
||||
<string>Developer Transition Kit</string>
|
||||
<key>iMac1,1</key>
|
||||
<string>iMac G3 (Rev A-D)</string>
|
||||
<key>iMac4,1</key>
|
||||
<string>iMac (Core Duo)</string>
|
||||
<key>iMac4,2</key>
|
||||
<string>iMac for Education (17 inch, Core Duo)</string>
|
||||
<key>iMac5,1</key>
|
||||
<string>iMac (Core 2 Duo, 17 or 20 inch, SuperDrive)</string>
|
||||
<key>iMac5,2</key>
|
||||
<string>iMac (Core 2 Duo, 17 inch, Combo Drive)</string>
|
||||
<key>iMac6,1</key>
|
||||
<string>iMac (Core 2 Duo, 24 inch, SuperDrive)</string>
|
||||
<key>iMac7,1</key>
|
||||
<string>iMac Intel Core 2 Duo (aluminum enclosure)</string>
|
||||
<key>iMac8,1</key>
|
||||
<string>iMac (Core 2 Duo, 20 or 24 inch, Early 2008 )</string>
|
||||
<key>iMac9,1</key>
|
||||
<string>iMac (Core 2 Duo, 20 or 24 inch, Early or Mid 2009 )</string>
|
||||
<key>iMac10,1</key>
|
||||
<string>iMac (Core 2 Duo, 21.5 or 27 inch, Late 2009 )</string>
|
||||
<key>iMac11,1</key>
|
||||
<string>iMac (Core i5 or i7, 27 inch Late 2009)</string>
|
||||
<key>iMac11,2</key>
|
||||
<string>21.5" iMac (mid 2010)</string>
|
||||
<key>iMac11,3</key>
|
||||
<string>iMac (Core i5 or i7, 27 inch Mid 2010)</string>
|
||||
<key>iMac12,1</key>
|
||||
<string>iMac (Core i3 or i5 or i7, 21.5 inch Mid 2010 or Late 2011)</string>
|
||||
<key>iMac12,2</key>
|
||||
<string>iMac (Core i5 or i7, 27 inch Mid 2011)</string>
|
||||
<key>iMac13,1</key>
|
||||
<string>iMac (Core i3 or i5 or i7, 21.5 inch Late 2012 or Early 2013)</string>
|
||||
<key>iMac13,2</key>
|
||||
<string>iMac (Core i5 or i7, 27 inch Late 2012)</string>
|
||||
<key>iMac14,1</key>
|
||||
<string>iMac (Core i5, 21.5 inch Late 2013)</string>
|
||||
<key>iMac14,2</key>
|
||||
<string>iMac (Core i5 or i7, 27 inch Late 2013)</string>
|
||||
<key>iMac14,3</key>
|
||||
<string>iMac (Core i5 or i7, 21.5 inch Late 2013)</string>
|
||||
<key>iMac14,4</key>
|
||||
<string>iMac (Core i5, 21.5 inch Mid 2014)</string>
|
||||
<key>iMac15,1</key>
|
||||
<string>iMac (Retina 5K Core i5 or i7, 27 inch Late 2014 or Mid 2015)</string>
|
||||
<key>iMac16,1</key>
|
||||
<string>iMac (Core i5, 21,5 inch Late 2015)</string>
|
||||
<key>iMac16,2</key>
|
||||
<string>iMac (Retina 4K Core i5 or i7, 21.5 inch Late 2015)</string>
|
||||
<key>iMac17,1</key>
|
||||
<string>iMac (Retina 5K Core i5 or i7, 27 inch Late 2015)</string>
|
||||
<key>MacBook1,1</key>
|
||||
<string>MacBook (Core Duo)</string>
|
||||
<key>MacBook2,1</key>
|
||||
<string>MacBook (Core 2 Duo)</string>
|
||||
<key>MacBook4,1</key>
|
||||
<string>MacBook (Core 2 Duo Feb 2008)</string>
|
||||
<key>MacBook5,1</key>
|
||||
<string>MacBook (Core 2 Duo, Late 2008, Unibody)</string>
|
||||
<key>MacBook5,2</key>
|
||||
<string>MacBook (Core 2 Duo, Early 2009, White)</string>
|
||||
<key>MacBook6,1</key>
|
||||
<string>MacBook (Core 2 Duo, Late 2009, Unibody)</string>
|
||||
<key>MacBook7,1</key>
|
||||
<string>MacBook (Core 2 Duo, Mid 2010, White)</string>
|
||||
<key>MacBook8,1</key>
|
||||
<string>MacBook (Core M, 12 inch, Early 2015)</string>
|
||||
<key>MacBookAir1,1</key>
|
||||
<string>MacBook Air (Core 2 Duo, 13 inch, Early 2008)</string>
|
||||
<key>MacBookAir2,1</key>
|
||||
<string>MacBook Air (Core 2 Duo, 13 inch, Mid 2009)</string>
|
||||
<key>MacBookAir3,1</key>
|
||||
<string>MacBook Air (Core 2 Duo, 11 inch, Late 2010)</string>
|
||||
<key>MacBookAir3,2</key>
|
||||
<string>MacBook Air (Core 2 Duo, 13 inch, Late 2010)</string>
|
||||
<key>MacBookAir4,1</key>
|
||||
<string>MacBook Air (Core i5 or i7, 11 inch, Mid 2011)</string>
|
||||
<key>MacBookAir4,2</key>
|
||||
<string>MacBook Air (Core i5 or i7, 13 inch, Mid 2011)</string>
|
||||
<key>MacBookAir5,1</key>
|
||||
<string>MacBook Air (Core i5 or i7, 11 inch, Mid 2012)</string>
|
||||
<key>MacBookAir5,2</key>
|
||||
<string>MacBook Air (Core i5 or i7, 13 inch, Mid 2012)</string>
|
||||
<key>MacBookAir6,1</key>
|
||||
<string>MacBook Air (Core i5 or i7, 11 inch, Mid 2013 or Early 2014)</string>
|
||||
<key>MacBookAir6,2</key>
|
||||
<string>MacBook Air (Core i5 or i7, 13 inch, Mid 2013 or Early 2014)</string>
|
||||
<key>MacBookAir7,1</key>
|
||||
<string>MacBook Air (Core i5 or i7, 11 inch, Early 2015)</string>
|
||||
<key>MacBookAir7,2</key>
|
||||
<string>MacBook Air (Core i5 or i7, 13 inch, Early 2015)</string>
|
||||
<key>MacBookPro1,1</key>
|
||||
<string>MacBook Pro Core Duo (15-inch)</string>
|
||||
<key>MacBookPro1,2</key>
|
||||
<string>MacBook Pro Core Duo (17-inch)</string>
|
||||
<key>MacBookPro2,1</key>
|
||||
<string>MacBook Pro Core 2 Duo (17-inch)</string>
|
||||
<key>MacBookPro2,2</key>
|
||||
<string>MacBook Pro Core 2 Duo (15-inch)</string>
|
||||
<key>MacBookPro3,1</key>
|
||||
<string>MacBook Pro Core 2 Duo (15-inch LED, Core 2 Duo)</string>
|
||||
<key>MacBookPro3,2</key>
|
||||
<string>MacBook Pro Core 2 Duo (17-inch HD, Core 2 Duo)</string>
|
||||
<key>MacBookPro4,1</key>
|
||||
<string>MacBook Pro (Core 2 Duo Feb 2008)</string>
|
||||
<key>MacBookPro5,1</key>
|
||||
<string>MacBook Pro Intel Core 2 Duo (aluminum unibody)</string>
|
||||
<key>MacBookPro5,2</key>
|
||||
<string>MacBook Pro Intel Core 2 Duo (aluminum unibody)</string>
|
||||
<key>MacBookPro5,3</key>
|
||||
<string>MacBook Pro Intel Core 2 Duo (aluminum unibody)</string>
|
||||
<key>MacBookPro5,4</key>
|
||||
<string>MacBook Pro Intel Core 2 Duo (aluminum unibody)</string>
|
||||
<key>MacBookPro5,5</key>
|
||||
<string>MacBook Pro Intel Core 2 Duo (aluminum unibody)</string>
|
||||
<key>MacBookPro6,1</key>
|
||||
<string>MacBook Pro Intel Core i5, Intel Core i7 (mid 2010)</string>
|
||||
<key>MacBookPro6,2</key>
|
||||
<string>MacBook Pro Intel Core i5, Intel Core i7 (mid 2010)</string>
|
||||
<key>MacBookPro7,1</key>
|
||||
<string>MacBook Pro Intel Core 2 Duo (mid 2010)</string>
|
||||
<key>MacBookPro8,1</key>
|
||||
<string>MacBook Pro Intel Core i5, Intel Core i7, 13" (early 2011)</string>
|
||||
<key>MacBookPro8,2</key>
|
||||
<string>MacBook Pro Intel Core i7, 15" (early 2011)</string>
|
||||
<key>MacBookPro8,3</key>
|
||||
<string>MacBook Pro Intel Core i7, 17" (early 2011)</string>
|
||||
<key>MacBookPro9,1</key>
|
||||
<string>MacBook Pro (15-inch, Mid 2012)</string>
|
||||
<key>MacBookPro9,2</key>
|
||||
<string>MacBook Pro (13-inch, Mid 2012)</string>
|
||||
<key>MacBookPro10,1</key>
|
||||
<string>MacBook Pro (Retina, Mid 2012)</string>
|
||||
<key>MacBookPro10,2</key>
|
||||
<string>MacBook Pro (Retina, 13-inch, Late 2012)</string>
|
||||
<key>MacBookPro11,1</key>
|
||||
<string>MacBook Pro (Retina, 13-inch, Late 2013)</string>
|
||||
<key>MacBookPro11,2</key>
|
||||
<string>MacBook Pro (Retina, 15-inch, Late 2013)</string>
|
||||
<key>MacBookPro11,3</key>
|
||||
<string>MacBook Pro (Retina, 15-inch, Late 2013)</string>
|
||||
<key>MacbookPro11,4</key>
|
||||
<string>MacBook Pro (Retina, 15-inch, Mid 2015)</string>
|
||||
<key>MacbookPro11,5</key>
|
||||
<string>MacBook Pro (Retina, 15-inch, Mid 2015)</string>
|
||||
<key>MacbookPro12,1 </key>
|
||||
<string>MacBook Pro (Retina, 13-inch, Early 2015)</string>
|
||||
<key>Macmini1,1</key>
|
||||
<string>Mac Mini (Core Solo/Duo)</string>
|
||||
<key>Macmini2,1</key>
|
||||
<string>Mac mini Intel Core</string>
|
||||
<key>Macmini3,1</key>
|
||||
<string>Mac mini Intel Core</string>
|
||||
<key>Macmini4,1</key>
|
||||
<string>Mac mini Intel Core (Mid 2010)</string>
|
||||
<key>Macmini5,1</key>
|
||||
<string>Mac mini (Core i5, Mid 2011)</string>
|
||||
<key>Macmini5,2</key>
|
||||
<string>Mac mini (Core i5 or Core i7, Mid 2011)</string>
|
||||
<key>Macmini5,3</key>
|
||||
<string>Mac mini (Core i7, Server, Mid 2011)</string>
|
||||
<key>Macmini6,1</key>
|
||||
<string>Mac mini (Core i5, Late 2012)</string>
|
||||
<key>Macmini6,2</key>
|
||||
<string>Mac mini (Core i7, Normal or Server, Late 2012)</string>
|
||||
<key>Macmini7,1</key>
|
||||
<string>Mac mini (Core i5 or Core i7, Late 2014)</string>
|
||||
<key>MacPro1,1,Quad</key>
|
||||
<string>Mac Pro</string>
|
||||
<key>MacPro1,1</key>
|
||||
<string>Mac Pro (four-core)</string>
|
||||
<key>MacPro2,1</key>
|
||||
<string>Mac Pro (eight-core)</string>
|
||||
<key>MacPro3,1</key>
|
||||
<string>Mac Pro (January 2008 4- or 8- core "Harpertown")</string>
|
||||
<key>MacPro4,1</key>
|
||||
<string>Mac Pro (March 2009)</string>
|
||||
<key>MacPro5,1</key>
|
||||
<string>Mac Pro (2010 or 2012)</string>
|
||||
<key>MacPro6,1</key>
|
||||
<string>Mac Pro (Late 2013)</string>
|
||||
<key>PowerBook1,1</key>
|
||||
<string>PowerBook G3</string>
|
||||
<key>PowerBook2,1</key>
|
||||
<string>iBook G3</string>
|
||||
<key>PowerBook2,2</key>
|
||||
<string>iBook G3 (FireWire)</string>
|
||||
<key>PowerBook2,3</key>
|
||||
<string>iBook G3</string>
|
||||
<key>PowerBook2,4</key>
|
||||
<string>iBook G3</string>
|
||||
<key>PowerBook3,1</key>
|
||||
<string>PowerBook G3 (FireWire)</string>
|
||||
<key>PowerBook3,2</key>
|
||||
<string>PowerBook G4</string>
|
||||
<key>PowerBook3,3</key>
|
||||
<string>PowerBook G4 (Gigabit Ethernet)</string>
|
||||
<key>PowerBook3,4</key>
|
||||
<string>PowerBook G4 (DVI)</string>
|
||||
<key>PowerBook3,5</key>
|
||||
<string>PowerBook G4 (1GHz / 867MHz)</string>
|
||||
<key>PowerBook4,1</key>
|
||||
<string>iBook G3 (Dual USB, Late 2001)</string>
|
||||
<key>PowerBook4,2</key>
|
||||
<string>iBook G3 (16MB VRAM)</string>
|
||||
<key>PowerBook4,3</key>
|
||||
<string>iBook G3 Opaque 16MB VRAM, 32MB VRAM, Early 2003)</string>
|
||||
<key>PowerBook5,1</key>
|
||||
<string>PowerBook G4 (17 inch)</string>
|
||||
<key>PowerBook5,2</key>
|
||||
<string>PowerBook G4 (15 inch FW 800)</string>
|
||||
<key>PowerBook5,3</key>
|
||||
<string>PowerBook G4 (17-inch 1.33GHz)</string>
|
||||
<key>PowerBook5,4</key>
|
||||
<string>PowerBook G4 (15 inch 1.5/1.33GHz)</string>
|
||||
<key>PowerBook5,5</key>
|
||||
<string>PowerBook G4 (17-inch 1.5GHz)</string>
|
||||
<key>PowerBook5,6</key>
|
||||
<string>PowerBook G4 (15 inch 1.67GHz/1.5GHz)</string>
|
||||
<key>PowerBook5,7</key>
|
||||
<string>PowerBook G4 (17-inch 1.67GHz)</string>
|
||||
<key>PowerBook5,8</key>
|
||||
<string>PowerBook G4 (Double layer SD, 15 inch)</string>
|
||||
<key>PowerBook5,9</key>
|
||||
<string>PowerBook G4 (Double layer SD, 17 inch)</string>
|
||||
<key>PowerBook6,1</key>
|
||||
<string>PowerBook G4 (12 inch)</string>
|
||||
<key>PowerBook6,2</key>
|
||||
<string>PowerBook G4 (12 inch, DVI)</string>
|
||||
<key>PowerBook6,3</key>
|
||||
<string>iBook G4</string>
|
||||
<key>PowerBook6,4</key>
|
||||
<string>PowerBook G4 (12 inch 1.33GHz)</string>
|
||||
<key>PowerBook6,5</key>
|
||||
<string>iBook G4 (Early-Late 2004)</string>
|
||||
<key>PowerBook6,7</key>
|
||||
<string>iBook G4 (Mid 2005)</string>
|
||||
<key>PowerBook6,8</key>
|
||||
<string>PowerBook G4 (12 inch 1.5GHz)</string>
|
||||
<key>PowerMac1,1</key>
|
||||
<string>Power Macintosh G3 (Blue & White)</string>
|
||||
<key>PowerMac1,2</key>
|
||||
<string>Power Macintosh G4 (PCI Graphics)</string>
|
||||
<key>PowerMac2,1</key>
|
||||
<string>iMac G3 (Slot-loading CD-ROM)</string>
|
||||
<key>PowerMac2,2</key>
|
||||
<string>iMac G3 (Summer 2000)</string>
|
||||
<key>PowerMac3,1</key>
|
||||
<string>Power Macintosh G4 (AGP Graphics)</string>
|
||||
<key>PowerMac3,2</key>
|
||||
<string>Power Macintosh G4 (AGP Graphics)</string>
|
||||
<key>PowerMac3,3</key>
|
||||
<string>Power Macintosh G4 (Gigabit Ethernet)</string>
|
||||
<key>PowerMac3,4</key>
|
||||
<string>Power Macintosh G4 (Digital Audio)</string>
|
||||
<key>PowerMac3,5</key>
|
||||
<string>Power Macintosh G4 (Quick Silver)</string>
|
||||
<key>PowerMac3,6</key>
|
||||
<string>Power Macintosh G4 (Mirrored Drive Door)</string>
|
||||
<key>PowerMac4,1</key>
|
||||
<string>iMac G3 (Early/Summer 2001)</string>
|
||||
<key>PowerMac4,2</key>
|
||||
<string>iMac G4 (Flat Panel)</string>
|
||||
<key>PowerMac4,4</key>
|
||||
<string>eMac</string>
|
||||
<key>PowerMac4,5</key>
|
||||
<string>iMac G4 (17-inch Flat Panel)</string>
|
||||
<key>PowerMac5,1</key>
|
||||
<string>Power Macintosh G4 Cube</string>
|
||||
<key>PowerMac5,2</key>
|
||||
<string>Power Mac G4 Cube</string>
|
||||
<key>PowerMac6,1</key>
|
||||
<string>iMac G4 (USB 2.0)</string>
|
||||
<key>PowerMac6,3</key>
|
||||
<string>iMac G4 (20-inch Flat Panel)</string>
|
||||
<key>PowerMac6,4</key>
|
||||
<string>eMac (USB 2.0, 2005)</string>
|
||||
<key>PowerMac7,2</key>
|
||||
<string>Power Macintosh G5</string>
|
||||
<key>PowerMac7,3</key>
|
||||
<string>Power Macintosh G5</string>
|
||||
<key>PowerMac8,1</key>
|
||||
<string>iMac G5</string>
|
||||
<key>PowerMac8,2</key>
|
||||
<string>iMac G5 (Ambient Light Sensor)</string>
|
||||
<key>PowerMac9,1</key>
|
||||
<string>Power Macintosh G5 (Late 2005)</string>
|
||||
<key>PowerMac10,1</key>
|
||||
<string>Mac Mini G4</string>
|
||||
<key>PowerMac10,2</key>
|
||||
<string>Mac Mini (Late 2005)</string>
|
||||
<key>PowerMac11,2</key>
|
||||
<string>Power Macintosh G5 (Late 2005)</string>
|
||||
<key>PowerMac12,1</key>
|
||||
<string>iMac G5 (iSight)</string>
|
||||
<key>RackMac1,1</key>
|
||||
<string>Xserve G4</string>
|
||||
<key>RackMac1,2</key>
|
||||
<string>Xserve G4 (slot-loading, cluster node)</string>
|
||||
<key>RackMac3,1</key>
|
||||
<string>Xserve G5</string>
|
||||
<key>Xserve1,1</key>
|
||||
<string>Xserve (Intel Xeon)</string>
|
||||
<key>Xserve2,1</key>
|
||||
<string>Xserve (January 2008 quad-core)</string>
|
||||
<key>Xserve3,1</key>
|
||||
<string>Xserve (early 2009)</string>
|
||||
</dict>
|
||||
</plist>
|
BIN
Pods/Sparkle/Sparkle.framework/Versions/A/Resources/SUStatus.nib
generated
vendored
BIN
Pods/Sparkle/Sparkle.framework/Versions/A/Resources/SUStatus.nib
generated
vendored
Binary file not shown.
BIN
Pods/Sparkle/Sparkle.framework/Versions/A/Resources/ar.lproj/SUAutomaticUpdateAlert.nib
generated
vendored
BIN
Pods/Sparkle/Sparkle.framework/Versions/A/Resources/ar.lproj/SUAutomaticUpdateAlert.nib
generated
vendored
Binary file not shown.
BIN
Pods/Sparkle/Sparkle.framework/Versions/A/Resources/ar.lproj/SUUpdateAlert.nib
generated
vendored
BIN
Pods/Sparkle/Sparkle.framework/Versions/A/Resources/ar.lproj/SUUpdateAlert.nib
generated
vendored
Binary file not shown.
BIN
Pods/Sparkle/Sparkle.framework/Versions/A/Resources/ar.lproj/SUUpdatePermissionPrompt.nib
generated
vendored
BIN
Pods/Sparkle/Sparkle.framework/Versions/A/Resources/ar.lproj/SUUpdatePermissionPrompt.nib
generated
vendored
Binary file not shown.
BIN
Pods/Sparkle/Sparkle.framework/Versions/A/Resources/ar.lproj/Sparkle.strings
generated
vendored
BIN
Pods/Sparkle/Sparkle.framework/Versions/A/Resources/ar.lproj/Sparkle.strings
generated
vendored
Binary file not shown.
BIN
Pods/Sparkle/Sparkle.framework/Versions/A/Resources/ca.lproj/Sparkle.strings
generated
vendored
BIN
Pods/Sparkle/Sparkle.framework/Versions/A/Resources/ca.lproj/Sparkle.strings
generated
vendored
Binary file not shown.
BIN
Pods/Sparkle/Sparkle.framework/Versions/A/Resources/cs.lproj/SUAutomaticUpdateAlert.nib
generated
vendored
BIN
Pods/Sparkle/Sparkle.framework/Versions/A/Resources/cs.lproj/SUAutomaticUpdateAlert.nib
generated
vendored
Binary file not shown.
BIN
Pods/Sparkle/Sparkle.framework/Versions/A/Resources/cs.lproj/SUUpdateAlert.nib
generated
vendored
BIN
Pods/Sparkle/Sparkle.framework/Versions/A/Resources/cs.lproj/SUUpdateAlert.nib
generated
vendored
Binary file not shown.
BIN
Pods/Sparkle/Sparkle.framework/Versions/A/Resources/cs.lproj/SUUpdatePermissionPrompt.nib
generated
vendored
BIN
Pods/Sparkle/Sparkle.framework/Versions/A/Resources/cs.lproj/SUUpdatePermissionPrompt.nib
generated
vendored
Binary file not shown.
BIN
Pods/Sparkle/Sparkle.framework/Versions/A/Resources/cs.lproj/Sparkle.strings
generated
vendored
BIN
Pods/Sparkle/Sparkle.framework/Versions/A/Resources/cs.lproj/Sparkle.strings
generated
vendored
Binary file not shown.
BIN
Pods/Sparkle/Sparkle.framework/Versions/A/Resources/da.lproj/SUAutomaticUpdateAlert.nib
generated
vendored
BIN
Pods/Sparkle/Sparkle.framework/Versions/A/Resources/da.lproj/SUAutomaticUpdateAlert.nib
generated
vendored
Binary file not shown.
BIN
Pods/Sparkle/Sparkle.framework/Versions/A/Resources/da.lproj/SUUpdateAlert.nib
generated
vendored
BIN
Pods/Sparkle/Sparkle.framework/Versions/A/Resources/da.lproj/SUUpdateAlert.nib
generated
vendored
Binary file not shown.
BIN
Pods/Sparkle/Sparkle.framework/Versions/A/Resources/da.lproj/SUUpdatePermissionPrompt.nib
generated
vendored
BIN
Pods/Sparkle/Sparkle.framework/Versions/A/Resources/da.lproj/SUUpdatePermissionPrompt.nib
generated
vendored
Binary file not shown.
BIN
Pods/Sparkle/Sparkle.framework/Versions/A/Resources/da.lproj/Sparkle.strings
generated
vendored
BIN
Pods/Sparkle/Sparkle.framework/Versions/A/Resources/da.lproj/Sparkle.strings
generated
vendored
Binary file not shown.
BIN
Pods/Sparkle/Sparkle.framework/Versions/A/Resources/de.lproj/SUAutomaticUpdateAlert.nib
generated
vendored
BIN
Pods/Sparkle/Sparkle.framework/Versions/A/Resources/de.lproj/SUAutomaticUpdateAlert.nib
generated
vendored
Binary file not shown.
BIN
Pods/Sparkle/Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdateAlert.nib
generated
vendored
BIN
Pods/Sparkle/Sparkle.framework/Versions/A/Resources/de.lproj/SUUpdateAlert.nib
generated
vendored
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user