Skip to content

Commit

Permalink
Revert "Merge pull request swisspol#416 from melle/app-extensions"
Browse files Browse the repository at this point in the history
This reverts commit 8d0a359, reversing
changes made to 7e4dd53.
  • Loading branch information
swisspol committed Mar 13, 2019
1 parent 2c53064 commit c3c7aaa
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions GCDWebServer/Core/GCDWebServer.m
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ - (void)dealloc {
#endif
}

#if TARGET_OS_IPHONE && !defined TARGET_OS_IPHONE_EXTENSION
#if TARGET_OS_IPHONE

// Always called on main thread
- (void)_startBackgroundTask {
Expand All @@ -229,7 +229,7 @@ - (void)_didConnect {
_connected = YES;
GWS_LOG_DEBUG(@"Did connect");

#if TARGET_OS_IPHONE && !defined TARGET_OS_IPHONE_EXTENSION
#if TARGET_OS_IPHONE
if ([[UIApplication sharedApplication] applicationState] != UIApplicationStateBackground) {
[self _startBackgroundTask];
}
Expand Down Expand Up @@ -259,7 +259,7 @@ - (void)willStartConnection:(GCDWebServerConnection*)connection {
});
}

#if TARGET_OS_IPHONE && !defined TARGET_OS_IPHONE_EXTENSION
#if TARGET_OS_IPHONE

// Always called on main thread
- (void)_endBackgroundTask {
Expand All @@ -283,7 +283,7 @@ - (void)_didDisconnect {
_connected = NO;
GWS_LOG_DEBUG(@"Did disconnect");

#if TARGET_OS_IPHONE && !defined TARGET_OS_IPHONE_EXTENSION
#if TARGET_OS_IPHONE
[self _endBackgroundTask];
#endif

Expand Down Expand Up @@ -732,7 +732,7 @@ - (void)_willEnterForeground:(NSNotification*)notification {
- (BOOL)startWithOptions:(NSDictionary<NSString*, id>*)options error:(NSError**)error {
if (_options == nil) {
_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];
if (((_suspendInBackground == NO) || ([[UIApplication sharedApplication] applicationState] != UIApplicationStateBackground)) && ![self _start:error])
#else
Expand Down

0 comments on commit c3c7aaa

Please sign in to comment.