Permalink
Browse files

Version 1.3.1

  • Loading branch information...
1 parent 3843e5e commit f1f1ed56069fd1cc4b056b2e5b94e57fc3057e09 @GlennChiu committed Apr 5, 2013
Showing with 10 additions and 10 deletions.
  1. +4 −4 GCNetworkReachability.h
  2. +6 −6 GCNetworkReachability.m
View
@@ -1,5 +1,5 @@
//
-// Version 1.3.0
+// Version 1.3.1
//
// This code is distributed under the terms and conditions of the MIT license.
//
@@ -58,11 +58,11 @@ extern NSString * const kGCNetworkReachabilityStatusKey;
+ (instancetype)reachabilityForLocalWiFi;
-- (instancetype)initWithHostAddress:(const struct sockaddr *)hostAddress;
+- (id)initWithHostAddress:(const struct sockaddr *)hostAddress;
-- (instancetype)initWithHostName:(NSString *)hostName;
+- (id)initWithHostName:(NSString *)hostName;
-- (instancetype)initWithReachability:(SCNetworkReachabilityRef)reachability;
+- (id)initWithReachability:(SCNetworkReachabilityRef)reachability;
- (void)startMonitoringNetworkReachabilityWithHandler:(void(^)(GCNetworkReachabilityStatus status))block;
View
@@ -1,5 +1,5 @@
//
-// Version 1.3.0
+// Version 1.3.1
//
// This code is distributed under the terms and conditions of the MIT license.
//
@@ -184,21 +184,21 @@ + (instancetype)reachabilityWithIPv6AddressString:(NSString *)internetAddress
return [self reachabilityWithHostAddress:(const struct sockaddr *)&addr];
}
-- (instancetype)initWithHostAddress:(const struct sockaddr *)hostAddress
+- (id)initWithHostAddress:(const struct sockaddr *)hostAddress
{
assert(hostAddress);
return [self initWithReachability:SCNetworkReachabilityCreateWithAddress(kCFAllocatorDefault, (const struct sockaddr *)hostAddress)];
}
-- (instancetype)initWithHostName:(NSString *)hostName
+- (id)initWithHostName:(NSString *)hostName
{
assert(hostName);
return [self initWithReachability:SCNetworkReachabilityCreateWithName(kCFAllocatorDefault, [hostName UTF8String])];
}
-- (instancetype)initWithReachability:(SCNetworkReachabilityRef)reachability
+- (id)initWithReachability:(SCNetworkReachabilityRef)reachability
{
self = [super init];
if (self)
@@ -403,11 +403,11 @@ - (void)startMonitoringNetworkReachabilityWithHandler:(void(^)(GCNetworkReachabi
self->_handler_blk = [block copy];
- __weak typeof(self) w_self = self;
+ GCNetworkReachability * __weak w_self = self;
void(^cb_blk)(GCNetworkReachabilityStatus) = ^(GCNetworkReachabilityStatus status) {
- __strong typeof(w_self) s_self = w_self;
+ GCNetworkReachability *s_self = w_self;
if (s_self) dispatch_async(dispatch_get_main_queue(), ^{s_self->_handler_blk(status);});
};

0 comments on commit f1f1ed5

Please sign in to comment.