Skip to content

Commit

Permalink
Added a check against TARGET_OS_ATV2, which must be defined by the pr…
Browse files Browse the repository at this point in the history
…oject, to allow avoiding reference to UIKit where necessary
  • Loading branch information
Evan D. Schoenberg, M.D committed Mar 3, 2013
1 parent c67b9f3 commit df86e50
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions GCD/GCDAsyncUdpSocket.m
Expand Up @@ -422,10 +422,12 @@ - (id)initWithDelegate:(id)aDelegate delegateQueue:(dispatch_queue_t)dq socketQu
sendQueue = [[NSMutableArray alloc] initWithCapacity:5];

#if TARGET_OS_IPHONE
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(applicationWillEnterForeground:)
name:UIApplicationWillEnterForegroundNotification
object:nil];
#ifndef TARGET_OS_ATV2
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(applicationWillEnterForeground:)
name:UIApplicationWillEnterForegroundNotification
object:nil];
#endif
#endif
}
return self;
Expand Down

0 comments on commit df86e50

Please sign in to comment.