summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Fischer <joeljfischer@gmail.com>2016-01-22 14:56:46 -0500
committerJoel Fischer <joeljfischer@gmail.com>2016-01-22 14:56:46 -0500
commite997325369739dfee485ddc28fcd87fd09b2cb22 (patch)
tree71b755bb9106d2b88c5b31bcca05a7995f32ef92
parent48b3e6eec11ff5916b70056a700bb9558a99a022 (diff)
downloadsdl_ios-e997325369739dfee485ddc28fcd87fd09b2cb22.tar.gz
Change runloop modes to common to run during UI
-rw-r--r--SmartDeviceLink-iOS/SmartDeviceLink/SDLIAPSession.m4
-rw-r--r--SmartDeviceLink-iOS/SmartDeviceLink/SDLProxy.m4
-rw-r--r--SmartDeviceLink-iOS/SmartDeviceLink/SDLTCPTransport.m2
-rw-r--r--SmartDeviceLink-iOS/SmartDeviceLink/SDLURLRequestTask.m2
4 files changed, 6 insertions, 6 deletions
diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLIAPSession.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLIAPSession.m
index 131885965..a2302c97f 100644
--- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLIAPSession.m
+++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLIAPSession.m
@@ -76,7 +76,7 @@
- (void)startStream:(NSStream *)stream {
stream.delegate = self.streamDelegate;
- [stream scheduleInRunLoop:[NSRunLoop mainRunLoop] forMode:NSDefaultRunLoopMode];
+ [stream scheduleInRunLoop:[NSRunLoop mainRunLoop] forMode:NSRunLoopCommonModes];
[stream open];
}
@@ -93,7 +93,7 @@
[stream close];
}
- [stream removeFromRunLoop:[NSRunLoop mainRunLoop] forMode:NSDefaultRunLoopMode];
+ [stream removeFromRunLoop:[NSRunLoop mainRunLoop] forMode:NSRunLoopCommonModes];
[stream setDelegate:nil];
NSUInteger status2 = stream.streamStatus;
diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLProxy.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLProxy.m
index 70f2f415f..4bec9537c 100644
--- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLProxy.m
+++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLProxy.m
@@ -590,7 +590,7 @@ const int POLICIES_CORRELATION_ID = 65535;
objc_setAssociatedObject(inputStream, @"SDLPutFile", putFileRPCRequest, OBJC_ASSOCIATION_RETAIN);
objc_setAssociatedObject(inputStream, @"BaseOffset", [putFileRPCRequest offset], OBJC_ASSOCIATION_RETAIN);
- [inputStream scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode];
+ [inputStream scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSRunLoopCommonModes];
[inputStream open];
}
@@ -620,7 +620,7 @@ const int POLICIES_CORRELATION_ID = 65535;
case NSStreamEventEndEncountered: {
// Cleanup the stream
[stream close];
- [stream removeFromRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode];
+ [stream removeFromRunLoop:[NSRunLoop currentRunLoop] forMode:NSRunLoopCommonModes];
break;
}
diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTCPTransport.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTCPTransport.m
index 9a2501a1e..868397003 100644
--- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLTCPTransport.m
+++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLTCPTransport.m
@@ -57,7 +57,7 @@ static void TCPCallback(CFSocketRef socket, CFSocketCallBackType type, CFDataRef
socket = CFSocketCreateWithNative(kCFAllocatorDefault, sock_fd, kCFSocketDataCallBack | kCFSocketConnectCallBack, (CFSocketCallBack)&TCPCallback, &socketCtxt);
CFRunLoopSourceRef source = CFSocketCreateRunLoopSource(kCFAllocatorDefault, socket, 0);
CFRunLoopRef loop = CFRunLoopGetCurrent();
- CFRunLoopAddSource(loop, source, kCFRunLoopDefaultMode);
+ CFRunLoopAddSource(loop, source, kCFRunLoopCommonModes);
CFRelease(source);
}
diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLURLRequestTask.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLURLRequestTask.m
index d1895ac10..d526dac64 100644
--- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLURLRequestTask.m
+++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLURLRequestTask.m
@@ -38,7 +38,7 @@ NS_ASSUME_NONNULL_BEGIN
}
_connection = [[NSURLConnection alloc] initWithRequest:request delegate:self startImmediately:NO];
- [_connection scheduleInRunLoop:[NSRunLoop mainRunLoop] forMode:NSDefaultRunLoopMode];
+ [_connection scheduleInRunLoop:[NSRunLoop mainRunLoop] forMode:NSRunLoopCommonModes];
[_connection start];
_completionHandler = completionHandler;