Merge pull request #1077 from AFNetworking/experimental-simplified-network-thread-entry-point

Simplifying Network Thread Entry Point
This commit is contained in:
Mattt Thompson 2013-06-20 09:15:04 -07:00
Родитель d0d4c58bb8 bc8fcee718
Коммит d492c4bff5
3 изменённых файлов: 12 добавлений и 9 удалений

Просмотреть файл

@ -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 {
+ (void)networkRequestThreadEntryPoint:(id)__unused object {
@autoreleasepool {
[[NSThread currentThread] setName:@"AFNetworking"];
[[NSRunLoop currentRunLoop] run];
NSRunLoop *runLoop = [NSRunLoop currentRunLoop];
[runLoop addPort:[NSMachPort port] forMode:NSDefaultRunLoopMode];
[runLoop run];
}
} while (YES);
}
+ (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;

Просмотреть файл

@ -54,6 +54,8 @@ static NSString * const kAFAppDotNetAPIBaseURLString = @"https://alpha-api.app.n
[self setDefaultSSLPinningMode:AFSSLPinningModePublicKey];
}
self.defaultSSLPinningMode = AFSSLPinningModeNone;
return self;
}