зеркало из https://github.com/github/AFNetworking.git
Merge pull request #1077 from AFNetworking/experimental-simplified-network-thread-entry-point
Simplifying Network Thread Entry Point
This commit is contained in:
Коммит
d492c4bff5
|
@ -186,13 +186,14 @@ static BOOL AFSecKeyIsEqualToKey(SecKeyRef key1, SecKeyRef key2) {
|
|||
@synthesize redirectResponse = _redirectResponse;
|
||||
@synthesize lock = _lock;
|
||||
|
||||
+ (void) __attribute__((noreturn)) networkRequestThreadEntryPoint:(id)__unused object {
|
||||
do {
|
||||
@autoreleasepool {
|
||||
[[NSThread currentThread] setName:@"AFNetworking"];
|
||||
[[NSRunLoop currentRunLoop] run];
|
||||
}
|
||||
} while (YES);
|
||||
+ (void)networkRequestThreadEntryPoint:(id)__unused object {
|
||||
@autoreleasepool {
|
||||
[[NSThread currentThread] setName:@"AFNetworking"];
|
||||
|
||||
NSRunLoop *runLoop = [NSRunLoop currentRunLoop];
|
||||
[runLoop addPort:[NSMachPort port] forMode:NSDefaultRunLoopMode];
|
||||
[runLoop run];
|
||||
}
|
||||
}
|
||||
|
||||
+ (NSThread *)networkRequestThread {
|
||||
|
|
|
@ -325,7 +325,7 @@
|
|||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CODE_SIGN_ENTITLEMENTS = "AFNetworking Example.entitlements";
|
||||
CODE_SIGN_IDENTITY = "Mac Developer";
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = Prefix.pch;
|
||||
|
@ -339,7 +339,7 @@
|
|||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CODE_SIGN_ENTITLEMENTS = "AFNetworking Example.entitlements";
|
||||
CODE_SIGN_IDENTITY = "Mac Developer";
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = Prefix.pch;
|
||||
|
|
|
@ -53,6 +53,8 @@ static NSString * const kAFAppDotNetAPIBaseURLString = @"https://alpha-api.app.n
|
|||
if ([[url scheme] isEqualToString:@"https"] && [[url host] isEqualToString:@"alpha-api.app.net"]) {
|
||||
[self setDefaultSSLPinningMode:AFSSLPinningModePublicKey];
|
||||
}
|
||||
|
||||
self.defaultSSLPinningMode = AFSSLPinningModeNone;
|
||||
|
||||
return self;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче