Revert "Merge pull request #416 from melle/app-extensions"

This reverts commit 8d0a3599ee, reversing
changes made to 7e4dd53c98.
This commit is contained in:
Pierre-Olivier Latour
2019-03-13 13:40:16 -07:00
parent 2c53064f5d
commit c3c7aaad00
+5 -5
View File
@@ -204,7 +204,7 @@ static void _ExecuteMainThreadRunLoopSources() {
#endif #endif
} }
#if TARGET_OS_IPHONE && !defined TARGET_OS_IPHONE_EXTENSION #if TARGET_OS_IPHONE
// Always called on main thread // Always called on main thread
- (void)_startBackgroundTask { - (void)_startBackgroundTask {
@@ -229,7 +229,7 @@ static void _ExecuteMainThreadRunLoopSources() {
_connected = YES; _connected = YES;
GWS_LOG_DEBUG(@"Did connect"); GWS_LOG_DEBUG(@"Did connect");
#if TARGET_OS_IPHONE && !defined TARGET_OS_IPHONE_EXTENSION #if TARGET_OS_IPHONE
if ([[UIApplication sharedApplication] applicationState] != UIApplicationStateBackground) { if ([[UIApplication sharedApplication] applicationState] != UIApplicationStateBackground) {
[self _startBackgroundTask]; [self _startBackgroundTask];
} }
@@ -259,7 +259,7 @@ static void _ExecuteMainThreadRunLoopSources() {
}); });
} }
#if TARGET_OS_IPHONE && !defined TARGET_OS_IPHONE_EXTENSION #if TARGET_OS_IPHONE
// Always called on main thread // Always called on main thread
- (void)_endBackgroundTask { - (void)_endBackgroundTask {
@@ -283,7 +283,7 @@ static void _ExecuteMainThreadRunLoopSources() {
_connected = NO; _connected = NO;
GWS_LOG_DEBUG(@"Did disconnect"); GWS_LOG_DEBUG(@"Did disconnect");
#if TARGET_OS_IPHONE && !defined TARGET_OS_IPHONE_EXTENSION #if TARGET_OS_IPHONE
[self _endBackgroundTask]; [self _endBackgroundTask];
#endif #endif
@@ -732,7 +732,7 @@ static inline NSString* _EncodeBase64(NSString* string) {
- (BOOL)startWithOptions:(NSDictionary<NSString*, id>*)options error:(NSError**)error { - (BOOL)startWithOptions:(NSDictionary<NSString*, id>*)options error:(NSError**)error {
if (_options == nil) { if (_options == nil) {
_options = options ? [options copy] : @{}; _options = options ? [options copy] : @{};
#if TARGET_OS_IPHONE && !defined TARGET_OS_IPHONE_EXTENSION #if TARGET_OS_IPHONE
_suspendInBackground = [(NSNumber*)_GetOption(_options, GCDWebServerOption_AutomaticallySuspendInBackground, @YES) boolValue]; _suspendInBackground = [(NSNumber*)_GetOption(_options, GCDWebServerOption_AutomaticallySuspendInBackground, @YES) boolValue];
if (((_suspendInBackground == NO) || ([[UIApplication sharedApplication] applicationState] != UIApplicationStateBackground)) && ![self _start:error]) if (((_suspendInBackground == NO) || ([[UIApplication sharedApplication] applicationState] != UIApplicationStateBackground)) && ![self _start:error])
#else #else